Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
MariaDB and MySQL Packaging Team
mariadb-5.5
Commits
a295acf5
Commit
a295acf5
authored
Dec 10, 2015
by
Otto Kekäläinen
Browse files
Imported Upstream version 5.5.47
parent
a90934f3
Changes
124
Show whitespace changes
Inline
Side-by-side
Docs/INFO_SRC
View file @
a295acf5
commit:
16c4b3c68b06653592a9500050ad977a38f4ebae
date: 2015-1
0
-09 1
6:43
:5
9
+0
2
00
build-date: 2015-1
0
-09 18:
51:17
+0
2
00
short:
16c4b3c
commit:
d67aacb4fbb449ffa8db4e3d70fe8756d62b5222
date: 2015-1
2
-09 1
7:11
:5
5
+0
1
00
build-date: 2015-1
2
-09 18:
22:49
+0
1
00
short:
d67aacb
branch: HEAD
MySQL source 5.5.4
6
MySQL source 5.5.4
7
VERSION
View file @
a295acf5
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=4
6
MYSQL_VERSION_PATCH=4
7
MYSQL_VERSION_EXTRA=
client/mysql_plugin.c
View file @
a295acf5
/*
Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2011, 201
5
, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -407,7 +407,7 @@ static int get_default_values()
static
void
usage
(
void
)
{
PRINT_VERSION
;
puts
(
"Copyright (c) 2011, Oracle and/or its affiliates. "
puts
(
"Copyright (c) 2011,
2015,
Oracle and/or its affiliates. "
"All rights reserved.
\n
"
);
puts
(
"Enable or disable plugins."
);
printf
(
"
\n
Usage: %s [options] <plugin> ENABLE|DISABLE
\n\n
Options:
\n
"
,
...
...
@@ -758,6 +758,11 @@ static int check_options(int argc, char **argv, char *operation)
/* read the plugin config file and check for match against argument */
else
{
if
(
strlen
(
argv
[
i
])
+
4
+
1
>
FN_REFLEN
)
{
fprintf
(
stderr
,
"ERROR: argument is too long.
\n
"
);
return
1
;
}
strcpy
(
plugin_name
,
argv
[
i
]);
strcpy
(
config_file
,
argv
[
i
]);
strcat
(
config_file
,
".ini"
);
...
...
@@ -849,6 +854,7 @@ static int process_options(int argc, char *argv[], char *operation)
if
(
opt_basedir
[
i
-
1
]
!=
FN_LIBCHAR
||
opt_basedir
[
i
-
1
]
!=
FN_LIBCHAR2
)
{
char
buff
[
FN_REFLEN
];
memset
(
buff
,
0
,
sizeof
(
buff
));
strncpy
(
buff
,
opt_basedir
,
sizeof
(
buff
)
-
1
);
#ifdef __WIN__
...
...
client/mysql_upgrade.c
View file @
a295acf5
/*
Copyright (c) 2006, 2013, Oracle and/or its affiliates.
Copyright (c) 2010, 201
3
, M
onty Program Ab.
Copyright (c) 2010, 201
5
, M
ariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -53,6 +53,8 @@ static DYNAMIC_STRING conn_args;
static
char
*
opt_password
=
0
;
static
char
*
opt_plugin_dir
=
0
,
*
opt_default_auth
=
0
;
static
char
*
cnf_file_path
=
0
,
defaults_file
[
FN_REFLEN
+
32
];
static
my_bool
tty_password
=
0
;
static
char
opt_tmpdir
[
FN_REFLEN
]
=
""
;
...
...
@@ -109,6 +111,7 @@ static struct my_option my_long_options[]=
&
opt_force
,
&
opt_force
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"host"
,
'h'
,
"Connect to host."
,
0
,
0
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#define PASSWORD_OPT 12
{
"password"
,
'p'
,
"Password to use when connecting to server. If password is not given,"
" it's solicited on the tty."
,
&
opt_password
,
&
opt_password
,
...
...
@@ -146,6 +149,7 @@ static struct my_option my_long_options[]=
"do not try to upgrade the data."
,
&
opt_systables_only
,
&
opt_systables_only
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
#define USER_OPT (array_elements(my_long_options) - 6)
{
"user"
,
'u'
,
"User for login if not current user."
,
&
opt_user
,
&
opt_user
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"verbose"
,
'v'
,
"Display more output about the process."
,
...
...
@@ -182,6 +186,8 @@ static void free_used_memory(void)
dynstr_free
(
&
ds_args
);
dynstr_free
(
&
conn_args
);
if
(
cnf_file_path
)
my_delete
(
cnf_file_path
,
MYF
(
MY_WME
));
}
...
...
@@ -233,31 +239,32 @@ static void verbose(const char *fmt, ...)
this way we pass the same arguments on to mysql and mysql_check
*/
static
void
add_one_option
(
DYNAMIC_STRING
*
ds
,
static
void
add_one_option
_cmd_line
(
DYNAMIC_STRING
*
ds
,
const
struct
my_option
*
opt
,
const
char
*
argument
)
const
char
*
arg
)
{
co
nst
char
*
eq
=
NullS
;
co
nst
char
*
arg
=
NullS
;
if
(
opt
->
arg_type
!=
NO_ARG
)
dy
nst
r_append
(
ds
,
"--"
)
;
dy
nst
r_append
(
ds
,
opt
->
name
)
;
if
(
arg
)
{
eq
=
"="
;
switch
(
opt
->
var_type
&
GET_TYPE_MASK
)
{
case
GET_STR
:
arg
=
argument
;
break
;
case
GET_BOOL
:
arg
=
(
*
(
my_bool
*
)
opt
->
value
)
?
"1"
:
"0"
;
break
;
default:
die
(
"internal error at %s: %d"
,
__FILE__
,
__LINE__
);
}
dynstr_append
(
ds
,
"="
);
dynstr_append_os_quoted
(
ds
,
arg
,
NullS
);
}
dynstr_append_os_quoted
(
ds
,
"--"
,
opt
->
name
,
eq
,
arg
,
NullS
);
dynstr_append
(
ds
,
" "
);
}
static
void
add_one_option_cnf_file
(
DYNAMIC_STRING
*
ds
,
const
struct
my_option
*
opt
,
const
char
*
arg
)
{
dynstr_append
(
ds
,
opt
->
name
);
if
(
arg
)
{
dynstr_append
(
ds
,
"="
);
dynstr_append_os_quoted
(
ds
,
arg
,
NullS
);
}
dynstr_append
(
ds
,
"
\n
"
);
}
static
my_bool
get_one_option
(
int
optid
,
const
struct
my_option
*
opt
,
...
...
@@ -288,16 +295,17 @@ get_one_option(int optid, const struct my_option *opt,
case
'p'
:
if
(
argument
==
disabled_my_option
)
argument
=
(
char
*
)
""
;
/* Don't require password */
tty_password
=
1
;
add_option
=
FALSE
;
if
(
argument
)
{
/* Add password to ds_args before overwriting the arg with x's */
add_one_option
(
&
ds_args
,
opt
,
argument
);
add_one_option
_cnf_file
(
&
ds_args
,
opt
,
argument
);
while
(
*
argument
)
*
argument
++=
'x'
;
/* Destroy argument */
tty_password
=
0
;
}
else
tty_password
=
1
;
break
;
case
't'
:
...
...
@@ -344,18 +352,18 @@ get_one_option(int optid, const struct my_option *opt,
case
OPT_SHARED_MEMORY_BASE_NAME
:
/* --shared-memory-base-name */
case
OPT_PLUGIN_DIR
:
/* --plugin-dir */
case
OPT_DEFAULT_AUTH
:
/* --default-auth */
add_one_option
(
&
conn_args
,
opt
,
argument
);
add_one_option
_cmd_line
(
&
conn_args
,
opt
,
argument
);
break
;
}
if
(
add_option
)
{
/*
This is an option that is accpted by mysql_upgrade just so
This is an option that is acc
e
pted by mysql_upgrade just so
it can be passed on to "mysql" and "mysqlcheck"
Save it in the ds_args string
*/
add_one_option
(
&
ds_args
,
opt
,
argument
);
add_one_option
_cnf_file
(
&
ds_args
,
opt
,
argument
);
}
return
0
;
}
...
...
@@ -415,10 +423,7 @@ static int run_tool(char *tool_path, DYNAMIC_STRING *ds_res, ...)
while
((
arg
=
va_arg
(
args
,
char
*
)))
{
/* Options should be os quoted */
if
(
strncmp
(
arg
,
"--"
,
2
)
==
0
)
dynstr_append_os_quoted
(
&
ds_cmdline
,
arg
,
NullS
);
else
/* Options should already be os quoted */
dynstr_append
(
&
ds_cmdline
,
arg
);
dynstr_append
(
&
ds_cmdline
,
" "
);
}
...
...
@@ -561,8 +566,7 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
ret
=
run_tool
(
mysql_path
,
ds_res
,
"--no-defaults"
,
ds_args
.
str
,
defaults_file
,
"--database=mysql"
,
"--batch"
,
/* Turns off pager etc. */
force
?
"--force"
:
"--skip-force"
,
...
...
@@ -751,8 +755,7 @@ static int run_mysqlcheck_upgrade(void)
print_conn_args
(
"mysqlcheck"
);
retch
=
run_tool
(
mysqlcheck_path
,
NULL
,
/* Send output from mysqlcheck directly to screen */
"--no-defaults"
,
ds_args
.
str
,
defaults_file
,
"--check-upgrade"
,
"--all-databases"
,
"--auto-repair"
,
...
...
@@ -805,8 +808,7 @@ static int run_mysqlcheck_views(void)
print_conn_args
(
"mysqlcheck"
);
return
run_tool
(
mysqlcheck_path
,
NULL
,
/* Send output from mysqlcheck directly to screen */
"--no-defaults"
,
ds_args
.
str
,
defaults_file
,
"--all-databases"
,
"--repair"
,
upgrade_views
,
"--skip-process-tables"
,
...
...
@@ -830,8 +832,7 @@ static int run_mysqlcheck_fixnames(void)
print_conn_args
(
"mysqlcheck"
);
return
run_tool
(
mysqlcheck_path
,
NULL
,
/* Send output from mysqlcheck directly to screen */
"--no-defaults"
,
ds_args
.
str
,
defaults_file
,
"--all-databases"
,
"--fix-db-names"
,
"--fix-table-names"
,
...
...
@@ -1031,12 +1032,21 @@ int main(int argc, char **argv)
{
opt_password
=
get_tty_password
(
NullS
);
/* add password to defaults file */
dynstr_append_os_quoted
(
&
ds_args
,
"--password="
,
opt_password
,
NullS
);
dynstr_append
(
&
ds_args
,
" "
);
add_one_option_cnf_file
(
&
ds_args
,
&
my_long_options
[
PASSWORD_OPT
]
,
opt_password
);
DBUG_ASSERT
(
strcmp
(
my_long_options
[
PASSWORD_OPT
].
name
,
"password"
)
==
0
);
}
/* add user to defaults file */
dynstr_append_os_quoted
(
&
ds_args
,
"--user="
,
opt_user
,
NullS
);
dynstr_append
(
&
ds_args
,
" "
);
add_one_option_cnf_file
(
&
ds_args
,
&
my_long_options
[
USER_OPT
],
opt_user
);
DBUG_ASSERT
(
strcmp
(
my_long_options
[
USER_OPT
].
name
,
"user"
)
==
0
);
cnf_file_path
=
strmov
(
defaults_file
,
"--defaults-file="
);
{
int
fd
=
create_temp_file
(
cnf_file_path
,
opt_tmpdir
[
0
]
?
opt_tmpdir
:
NULL
,
"mysql_upgrade-"
,
O_CREAT
|
O_WRONLY
,
MYF
(
MY_FAE
));
my_write
(
fd
,
USTRING_WITH_LEN
(
"[client]
\n
"
),
MYF
(
MY_FAE
));
my_write
(
fd
,
(
uchar
*
)
ds_args
.
str
,
ds_args
.
length
,
MYF
(
MY_FAE
));
my_close
(
fd
,
MYF
(
0
));
}
/* Find mysql */
find_tool
(
mysql_path
,
IF_WIN
(
"mysql.exe"
,
"mysql"
),
self_name
);
...
...
client/mysqlcheck.c
View file @
a295acf5
/*
Copyright (c) 2001, 2011, Oracle and/or its affiliates.
Copyright (c) 2010, 201
1
, M
onty Program Ab.
Copyright (c) 2010, 201
5
, M
ariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
client/mysqldump.c
View file @
a295acf5
/*
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
Copyright (c) 2010, 201
3
, Monty Program Ab.
Copyright (c) 2010, 201
5
, Monty Program Ab.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -1116,16 +1116,14 @@ static int fetch_db_collation(const char *db_name,
int
db_cl_size
)
{
my_bool
err_status
=
FALSE
;
char
query
[
QUERY_LENGTH
];
MYSQL_RES
*
db_cl_res
;
MYSQL_ROW
db_cl_row
;
char
quoted_database_buf
[
NAME_LEN
*
2
+
3
];
char
*
qdatabase
=
quote_name
(
db_name
,
quoted_database_buf
,
1
);
my_snprintf
(
query
,
sizeof
(
query
),
"use %s"
,
qdatabase
);
if
(
mysql_query_with_error_report
(
mysql
,
NULL
,
query
))
return
1
;
if
(
mysql_select_db
(
mysql
,
db_name
))
{
DB_error
(
mysql
,
"when selecting the database"
);
return
1
;
/* If --force */
}
if
(
mysql_query_with_error_report
(
mysql
,
&
db_cl_res
,
"select @@collation_database"
))
...
...
@@ -2319,7 +2317,7 @@ static uint dump_routines_for_db(char *db)
/* Get database collation. */
if
(
fetch_db_collation
(
db
_name_buff
,
db_cl_name
,
sizeof
(
db_cl_name
)))
if
(
fetch_db_collation
(
db
,
db_cl_name
,
sizeof
(
db_cl_name
)))
DBUG_RETURN
(
1
);
if
(
switch_character_set_results
(
mysql
,
"binary"
))
...
...
@@ -2388,7 +2386,7 @@ static uint dump_routines_for_db(char *db)
if
(
mysql_num_fields
(
routine_res
)
>=
6
)
{
if
(
switch_db_collation
(
sql_file
,
db
_name_buff
,
";"
,
if
(
switch_db_collation
(
sql_file
,
db
,
";"
,
db_cl_name
,
row
[
5
],
&
db_cl_altered
))
{
DBUG_RETURN
(
1
);
...
...
@@ -2435,7 +2433,7 @@ static uint dump_routines_for_db(char *db)
if
(
db_cl_altered
)
{
if
(
restore_db_collation
(
sql_file
,
db
_name_buff
,
";"
,
db_cl_name
))
if
(
restore_db_collation
(
sql_file
,
db
,
";"
,
db_cl_name
))
DBUG_RETURN
(
1
);
}
}
...
...
client/mysqlshow.c
View file @
a295acf5
/*
Copyright (c) 2000, 201
2
, Oracle and/or its affiliates.
Copyright (c) 2010, 201
2
, M
onty Program Ab
Copyright (c) 2000, 201
5
, Oracle and/or its affiliates.
Copyright (c) 2010, 201
5
, M
ariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -369,7 +369,7 @@ list_dbs(MYSQL *mysql,const char *wild)
uint
length
,
counter
=
0
;
ulong
rowcount
=
0L
;
char
tables
[
NAME_LEN
+
1
],
rows
[
NAME_LEN
+
1
];
char
query
[
255
];
char
query
[
NAME_LEN
+
100
];
MYSQL_FIELD
*
field
;
MYSQL_RES
*
result
;
MYSQL_ROW
row
=
NULL
,
rrow
;
...
...
@@ -436,7 +436,8 @@ list_dbs(MYSQL *mysql,const char *wild)
MYSQL_ROW
trow
;
while
((
trow
=
mysql_fetch_row
(
tresult
)))
{
sprintf
(
query
,
"SELECT COUNT(*) FROM `%s`"
,
trow
[
0
]);
my_snprintf
(
query
,
sizeof
(
query
),
"SELECT COUNT(*) FROM `%s`"
,
trow
[
0
]);
if
(
!
(
mysql_query
(
mysql
,
query
)))
{
MYSQL_RES
*
rresult
;
...
...
@@ -492,7 +493,7 @@ list_tables(MYSQL *mysql,const char *db,const char *table)
{
const
char
*
header
;
uint
head_length
,
counter
=
0
;
char
query
[
255
],
rows
[
NAME_LEN
],
fields
[
16
];
char
query
[
NAME_LEN
+
100
],
rows
[
NAME_LEN
],
fields
[
16
];
MYSQL_FIELD
*
field
;
MYSQL_RES
*
result
;
MYSQL_ROW
row
,
rrow
;
...
...
@@ -577,7 +578,8 @@ list_tables(MYSQL *mysql,const char *db,const char *table)
if
(
opt_verbose
>
1
)
{
/* Print the count of rows for each table */
sprintf
(
query
,
"SELECT COUNT(*) FROM `%s`"
,
row
[
0
]);
my_snprintf
(
query
,
sizeof
(
query
),
"SELECT COUNT(*) FROM `%s`"
,
row
[
0
]);
if
(
!
(
mysql_query
(
mysql
,
query
)))
{
if
((
rresult
=
mysql_store_result
(
mysql
)))
...
...
@@ -637,13 +639,15 @@ list_tables(MYSQL *mysql,const char *db,const char *table)
static
int
list_table_status
(
MYSQL
*
mysql
,
const
char
*
db
,
const
char
*
wild
)
{
char
query
[
1024
],
*
end
;
char
query
[
NAME_LEN
+
100
];
int
len
;
MYSQL_RES
*
result
;
MYSQL_ROW
row
;
end
=
strxmov
(
query
,
"show table status from `"
,
db
,
"`"
,
NullS
);
if
(
wild
&&
wild
[
0
])
strxmov
(
end
,
" like '"
,
wild
,
"'"
,
NullS
);
len
=
sizeof
(
query
);
len
-=
my_snprintf
(
query
,
len
,
"show table status from `%s`"
,
db
);
if
(
wild
&&
wild
[
0
]
&&
len
)
strxnmov
(
query
+
strlen
(
query
),
len
,
" like '"
,
wild
,
"'"
,
NullS
);
if
(
mysql_query
(
mysql
,
query
)
||
!
(
result
=
mysql_store_result
(
mysql
)))
{
fprintf
(
stderr
,
"%s: Cannot get status for db: %s, table: %s: %s
\n
"
,
...
...
@@ -675,7 +679,8 @@ static int
list_fields
(
MYSQL
*
mysql
,
const
char
*
db
,
const
char
*
table
,
const
char
*
wild
)
{
char
query
[
1024
],
*
end
;
char
query
[
NAME_LEN
+
100
];
int
len
;
MYSQL_RES
*
result
;
MYSQL_ROW
row
;
ulong
UNINIT_VAR
(
rows
);
...
...
@@ -689,7 +694,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
if
(
opt_count
)
{
s
printf
(
query
,
"select count(*) from `%s`"
,
table
);
my_sn
printf
(
query
,
sizeof
(
query
),
"select count(*) from `%s`"
,
table
);
if
(
mysql_query
(
mysql
,
query
)
||
!
(
result
=
mysql_store_result
(
mysql
)))
{
fprintf
(
stderr
,
"%s: Cannot get record count for db: %s, table: %s: %s
\n
"
,
...
...
@@ -701,9 +706,11 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
mysql_free_result
(
result
);
}
end
=
strmov
(
strmov
(
strmov
(
query
,
"show /*!32332 FULL */ columns from `"
),
table
),
"`"
);
if
(
wild
&&
wild
[
0
])
strxmov
(
end
,
" like '"
,
wild
,
"'"
,
NullS
);
len
=
sizeof
(
query
);
len
-=
my_snprintf
(
query
,
len
,
"show /*!32332 FULL */ columns from `%s`"
,
table
);
if
(
wild
&&
wild
[
0
]
&&
len
)
strxnmov
(
query
+
strlen
(
query
),
len
,
" like '"
,
wild
,
"'"
,
NullS
);
if
(
mysql_query
(
mysql
,
query
)
||
!
(
result
=
mysql_store_result
(
mysql
)))
{
fprintf
(
stderr
,
"%s: Cannot list columns in db: %s, table: %s: %s
\n
"
,
...
...
@@ -724,7 +731,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
print_res_top
(
result
);
if
(
opt_show_keys
)
{
end
=
strmov
(
strmov
(
strmov
(
query
,
"show keys from `
"
),
table
),
"`"
);
my_snprintf
(
query
,
sizeof
(
query
),
"show keys from `
%s`"
,
table
);
if
(
mysql_query
(
mysql
,
query
)
||
!
(
result
=
mysql_store_result
(
mysql
)))
{
fprintf
(
stderr
,
"%s: Cannot list keys in db: %s, table: %s: %s
\n
"
,
...
...
cmake/cpack_rpm.cmake
View file @
a295acf5
...
...
@@ -31,7 +31,7 @@ SET(CPACK_RPM_PACKAGE_NAME "MariaDB")
SET
(
CPACK_PACKAGE_FILE_NAME
"
${
CPACK_RPM_PACKAGE_NAME
}
-
${
VERSION
}
-
${
RPM
}
-
${
CMAKE_SYSTEM_PROCESSOR
}
"
)
SET
(
CPACK_RPM_PACKAGE_RELEASE
"1%{?dist}"
)
SET
(
CPACK_RPM_PACKAGE_LICENSE
"GPL"
)
SET
(
CPACK_RPM_PACKAGE_LICENSE
"GPL
v2
"
)
SET
(
CPACK_RPM_PACKAGE_RELOCATABLE FALSE
)
SET
(
CPACK_RPM_PACKAGE_GROUP
"Applications/Databases"
)
SET
(
CPACK_RPM_PACKAGE_URL
"http://mariadb.org"
)
...
...
debian/mariadb-server-5.5.mysql-server.logrotate
View file @
a295acf5
...
...
@@ -2,7 +2,7 @@
# flush-logs'd only once.
# Else the binary logs would automatically increase by n times every day.
# - The error log is obsolete, messages go to syslog now.
/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/m
ysql
-slow.log {
/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/m
ariadb
-slow.log {
daily
rotate 7
missingok
...
...
libmysql/conf_to_src.c
View file @
a295acf5
/* Copyright (c) 2000, 201
1
, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 201
5
, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -118,7 +118,7 @@ print_arrays_for(char *set)
{
FILE
*
f
;
sprintf
(
buf
,
"%s.conf"
,
set
);
s
n
printf
(
buf
,
sizeof
(
buf
),
"%s.conf"
,
set
);
if
((
f
=
fopen
(
buf
,
"r"
))
==
NULL
)
{
fprintf
(
stderr
,
"%s: can't read conf file for charset %s
\n
"
,
prog
,
set
);
...
...
mysql-test/include/default_mysqld.cnf
View file @
a295acf5
...
...
@@ -38,6 +38,9 @@ max_heap_table_size= 1M
loose-aria-pagecache-buffer-size=8M
loose-feedback-user-info= mysql-test
loose-feedback-debug-startup-interval=20
loose-feedback-debug-first-interval=60
loose-feedback-debug-interval=60
loose-innodb_data_file_path= ibdata1:10M:autoextend
loose-innodb_buffer_pool_size= 8M
...
...
mysql-test/r/create.result
View file @
a295acf5
...
...
@@ -2477,3 +2477,9 @@ t1 CREATE TABLE `t1` (
`c` char(32) AS (convert(cast(n as char), char)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
set @@session.collation_server=filename;
create table t1(a enum('',''));
Warnings:
Note 1291 Column 'a' has duplicated value '' in ENUM
drop table t1;
set @@session.collation_server=default;
mysql-test/r/ctype_filename.result
View file @
a295acf5
...
...
@@ -11,3 +11,6 @@ create table com1 (a int);
drop table com1;
create table `clock$` (a int);
drop table `clock$`;
select convert(convert(',' using filename) using binary);
convert(convert(',' using filename) using binary)
@002c
mysql-test/r/ctype_utf8.result
View file @
a295acf5
...
...
@@ -5777,5 +5777,32 @@ SELECT (SELECT CONCAT(a),1 FROM t1) <=> (SELECT CONCAT(a),1 FROM t2);
ERROR 21000: Subquery returns more than 1 row
DROP TABLE t1, t2;
#
# MDEV-8630 Datetime value dropped in "INSERT ... SELECT ... ON DUPLICATE KEY"
#
SET NAMES utf8;
CREATE TABLE t1 (id2 int, ts timestamp);
INSERT INTO t1 VALUES (1,'2012-06-11 15:17:34'),(2,'2012-06-11 15:18:24');
CREATE TABLE t2 AS SELECT
COALESCE(ts, 0) AS c0,
GREATEST(COALESCE(ts, 0), COALESCE(ts, 0)) AS c1,
GREATEST(CASE WHEN 1 THEN ts ELSE 0 END, CASE WHEN 1 THEN ts ELSE 0 END) AS c2,
GREATEST(IFNULL(ts,0), IFNULL(ts,0)) AS c3,
GREATEST(IF(1,ts,0), IF(1,ts,0)) AS c4
FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`c0` varchar(19) CHARACTER SET utf8 NOT NULL DEFAULT '',
`c1` varchar(19) CHARACTER SET utf8 NOT NULL DEFAULT '',
`c2` varchar(19) CHARACTER SET utf8 NOT NULL DEFAULT '',
`c3` varchar(19) CHARACTER SET utf8 NOT NULL DEFAULT '',
`c4` varchar(19) CHARACTER SET utf8 NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t2;
c0 c1 c2 c3 c4
2012-06-11 15:17:34 2012-06-11 15:17:34 2012-06-11 15:17:34 2012-06-11 15:17:34 2012-06-11 15:17:34
2012-06-11 15:18:24 2012-06-11 15:18:24 2012-06-11 15:18:24 2012-06-11 15:18:24 2012-06-11 15:18:24
DROP TABLE t2, t1;
#
# End of 5.5 tests
#
mysql-test/r/events_1.result
View file @
a295acf5
...
...
@@ -114,7 +114,7 @@ create table t_event3 (a int, b float);
drop event if exists event3;
Warnings:
Note 1305 Event event3 does not exist
create event event3 on schedule every 50 + 10 minute starts date_add(
"20100101"
, interval 5 minute) ends date_add(
"20151010"
, interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand());
create event event3 on schedule every 50 + 10 minute starts date_add(
curdate()
, interval 5 minute) ends date_add(
curdate()
, interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand());
select count(*) from t_event3;
count(*)
0
...
...
mysql-test/r/fulltext.result
View file @
a295acf5
...
...
@@ -551,7 +551,7 @@ MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE)
DROP TABLE t1;
CREATE TABLE t1(a TEXT);
SELECT GROUP_CONCAT(a) AS st FROM t1 HAVING MATCH(st) AGAINST('test' IN BOOLEAN MODE);
ERROR HY000: Incorrect arguments to
AGAINST
ERROR HY000: Incorrect arguments to
MATCH
DROP TABLE t1;
CREATE TABLE t1(a VARCHAR(64), FULLTEXT(a));
INSERT INTO t1 VALUES('awrd bwrd cwrd'),('awrd bwrd cwrd'),('awrd bwrd cwrd');
...
...
mysql-test/r/mysql_plugin.result
View file @
a295acf5
...
...
@@ -102,7 +102,7 @@ ERROR: Missing --plugin_dir option.
# Show the help.
#
mysql_plugin Ver V.V.VV Distrib XX.XX.XX
Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2011,
2015,
Oracle and/or its affiliates. All rights reserved.
Enable or disable plugins.
...
...
mysql-test/r/mysql_upgrade.result
View file @
a295acf5
...
...
@@ -36,7 +36,7 @@ Phase 4/4: Running 'mysql_fix_privilege_tables'
OK
Run it again - should say already completed
This installation of MySQL is already upgraded to VERSION, use --force if you still need to run mysql_upgrade
Force should run it regardless of wether it
'
s been run before
Force should run it regardless of w
h
ether it
ha
s been run before
Phase 1/4: Fixing views
Phase 2/4: Fixing table and database names
Phase 3/4: Checking and upgrading tables
...
...
@@ -298,6 +298,13 @@ test
Phase 4/4: Running 'mysql_fix_privilege_tables'
OK
#
# Bug #21489398: MYSQL_UPGRADE: FATAL ERROR: UPGRADE FAILED - IMPROVE ERROR
#
Run mysql_upgrade with unauthorized access
Version check failed. Got the following error when calling the 'mysql' command line client
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
FATAL ERROR: Upgrade failed
#
# MDEV-4332 Increase username length from 16 characters
# MDEV-6068, MDEV-6178 mysql_upgrade breaks databases with long user names
#
...
...
mysql-test/r/mysqldump.result
View file @
a295acf5
...
...
@@ -5312,3 +5312,29 @@ Usage: mysqldump [OPTIONS] database [tables]
OR mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]
OR mysqldump [OPTIONS] --all-databases [OPTIONS]
For more options, use mysqldump --help
#
# MDEV-9001 - [PATCH] Fix DB name quoting in mysqldump --routine
#
CREATE DATABASE `a\"'``b`;
USE `a\"'``b`;
CREATE PROCEDURE p1() BEGIN END;
ALTER DATABASE `a\"'``b` COLLATE utf8_general_ci;
ALTER DATABASE `a\"'``b` CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = '' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
BEGIN END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
ALTER DATABASE `a\"'``b` CHARACTER SET utf8 COLLATE utf8_general_ci ;
DROP DATABASE `a\"'``b`;
mysql-test/r/ps.result
View file @
a295acf5
...
...
@@ -4052,3 +4052,24 @@ SELECT 1 FROM t1 GROUP BY 0 OR 18446744073709551615+1;
ERROR 22003: BIGINT UNSIGNED value is out of range in '(18446744073709551615 + 1)'
drop table t1;
# End of 5.3 tests
#
# MDEV-8756: MariaDB 10.0.21 crashes during PREPARE
#
CREATE TABLE t1 ( id INT(10), value INT(10) );
CREATE TABLE t2 ( id INT(10) );
SET @save_sql_mode= @@sql_mode;
SET SESSION sql_mode = 'ONLY_FULL_GROUP_BY';
PREPARE stmt FROM 'UPDATE t1 t1 SET value = (SELECT 1 FROM t2 WHERE id = t1.id)';
execute stmt;
insert into t1 values (1,10),(2,10),(3,10);
insert into t2 values (1),(2);
execute stmt;
select * from t1;
id value
1 1
2 1
3 NULL
deallocate prepare stmt;
SET SESSION sql_mode = @save_sql_mode;
DROP TABLE t1,t2;
# End of 10.0 tests
Prev
1
2
3
4
5
…
7
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment