mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
Merge tag 'mariadb-10.0.23' into 10.0-galera
This commit is contained in:
51
.gitignore
vendored
51
.gitignore
vendored
@@ -166,31 +166,32 @@ storage/myisam/myisamlog
|
||||
storage/myisam/myisampack
|
||||
storage/myisam/rt_test
|
||||
storage/myisam/sp_test
|
||||
storage/tokudb/ft-index/buildheader/db.h
|
||||
storage/tokudb/ft-index/buildheader/make_tdb
|
||||
storage/tokudb/ft-index/buildheader/runcat.sh
|
||||
storage/tokudb/ft-index/ft/log_code.cc
|
||||
storage/tokudb/ft-index/ft/log_header.h
|
||||
storage/tokudb/ft-index/ft/log_print.cc
|
||||
storage/tokudb/ft-index/ft/logformat
|
||||
storage/tokudb/ft-index/ft/ftverify
|
||||
storage/tokudb/ft-index/ft/tdb-recover
|
||||
storage/tokudb/ft-index/ft/tokuftdump
|
||||
storage/tokudb/ft-index/portability/merge_archives_tokuportability_static.cmake
|
||||
storage/tokudb/ft-index/portability/toku_config.h
|
||||
storage/tokudb/ft-index/portability/tokuportability_static_depends.cc
|
||||
storage/tokudb/ft-index/src/merge_archives_tokufractaltree_static.cmake
|
||||
storage/tokudb/ft-index/src/tokufractaltree_static_depends.cc
|
||||
storage/tokudb/ft-index/toku_include/toku_config.h
|
||||
storage/tokudb/ft-index/tools/ba_replay
|
||||
storage/tokudb/ft-index/tools/ftverify
|
||||
storage/tokudb/ft-index/tools/tdb-recover
|
||||
storage/tokudb/ft-index/tools/tokudb_dump
|
||||
storage/tokudb/ft-index/tools/tokudb_gen
|
||||
storage/tokudb/ft-index/tools/tokudb_load
|
||||
storage/tokudb/ft-index/tools/tokuftdump
|
||||
storage/tokudb/ft-index/tools/tokuft_logprint
|
||||
storage/tokudb/ft-index/xz/
|
||||
storage/tokudb/PerconaFT/buildheader/db.h
|
||||
storage/tokudb/PerconaFT/buildheader/make_tdb
|
||||
storage/tokudb/PerconaFT/buildheader/runcat.sh
|
||||
storage/tokudb/PerconaFT/ft/log_code.cc
|
||||
storage/tokudb/PerconaFT/ft/log_header.h
|
||||
storage/tokudb/PerconaFT/ft/log_print.cc
|
||||
storage/tokudb/PerconaFT/ft/logformat
|
||||
storage/tokudb/PerconaFT/ft/ftverify
|
||||
storage/tokudb/PerconaFT/ft/tdb-recover
|
||||
storage/tokudb/PerconaFT/ft/tokuftdump
|
||||
storage/tokudb/PerconaFT/portability/merge_archives_tokuportability_static.cmake
|
||||
storage/tokudb/PerconaFT/portability/toku_config.h
|
||||
storage/tokudb/PerconaFT/portability/tokuportability_static_depends.cc
|
||||
storage/tokudb/PerconaFT/snappy/
|
||||
storage/tokudb/PerconaFT/src/merge_archives_tokufractaltree_static.cmake
|
||||
storage/tokudb/PerconaFT/src/tokufractaltree_static_depends.cc
|
||||
storage/tokudb/PerconaFT/toku_include/toku_config.h
|
||||
storage/tokudb/PerconaFT/tools/ba_replay
|
||||
storage/tokudb/PerconaFT/tools/ftverify
|
||||
storage/tokudb/PerconaFT/tools/tdb-recover
|
||||
storage/tokudb/PerconaFT/tools/tokudb_dump
|
||||
storage/tokudb/PerconaFT/tools/tokudb_gen
|
||||
storage/tokudb/PerconaFT/tools/tokudb_load
|
||||
storage/tokudb/PerconaFT/tools/tokuftdump
|
||||
storage/tokudb/PerconaFT/tools/tokuft_logprint
|
||||
storage/tokudb/PerconaFT/xz/
|
||||
support-files/MySQL-shared-compat.spec
|
||||
support-files/binary-configure
|
||||
support-files/config.huge.ini
|
||||
|
2
VERSION
2
VERSION
@@ -1,3 +1,3 @@
|
||||
MYSQL_VERSION_MAJOR=10
|
||||
MYSQL_VERSION_MINOR=0
|
||||
MYSQL_VERSION_PATCH=22
|
||||
MYSQL_VERSION_PATCH=23
|
||||
|
@@ -1108,7 +1108,7 @@ inline int get_command_index(char cmd_char)
|
||||
All client-specific commands are in the first part of commands array
|
||||
and have a function to implement it.
|
||||
*/
|
||||
for (uint i= 0; *commands[i].func; i++)
|
||||
for (uint i= 0; commands[i].func; i++)
|
||||
if (commands[i].cmd_char == cmd_char)
|
||||
return i;
|
||||
return -1;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2011, 2015, 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
|
||||
@@ -404,7 +404,7 @@ exit:
|
||||
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("\nUsage: %s [options] <plugin> ENABLE|DISABLE\n\nOptions:\n",
|
||||
@@ -755,6 +755,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");
|
||||
@@ -846,6 +851,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__
|
||||
|
@@ -55,6 +55,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] = "";
|
||||
@@ -111,6 +113,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,
|
||||
@@ -147,6 +150,7 @@ static struct my_option my_long_options[]=
|
||||
{"upgrade-system-tables", 's', "Only upgrade the system tables in the mysql database. Tables in other databases are not checked or touched.",
|
||||
&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; Using it twice will print connection argument; Using it 3 times will print out all CHECK, RENAME and ALTER TABLE during the check phase.",
|
||||
@@ -184,6 +188,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));
|
||||
}
|
||||
|
||||
|
||||
@@ -235,31 +241,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,
|
||||
const struct my_option *opt,
|
||||
const char* argument)
|
||||
|
||||
static void add_one_option_cmd_line(DYNAMIC_STRING *ds,
|
||||
const struct my_option *opt,
|
||||
const char* arg)
|
||||
{
|
||||
const char* eq= NullS;
|
||||
const char* arg= NullS;
|
||||
if (opt->arg_type != NO_ARG)
|
||||
dynstr_append(ds, "--");
|
||||
dynstr_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,
|
||||
@@ -290,16 +297,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':
|
||||
@@ -346,18 +354,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 accepted 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;
|
||||
}
|
||||
@@ -420,11 +428,8 @@ 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
|
||||
dynstr_append(&ds_cmdline, arg);
|
||||
/* Options should already be os quoted */
|
||||
dynstr_append(&ds_cmdline, arg);
|
||||
dynstr_append(&ds_cmdline, " ");
|
||||
}
|
||||
|
||||
@@ -571,8 +576,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",
|
||||
@@ -764,8 +768,7 @@ static int run_mysqlcheck_upgrade(my_bool mysql_db_only)
|
||||
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",
|
||||
"--auto-repair",
|
||||
!opt_silent || opt_verbose >= 1 ? "--verbose" : "",
|
||||
@@ -825,8 +828,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",
|
||||
@@ -850,8 +852,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",
|
||||
@@ -1075,12 +1076,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);
|
||||
|
@@ -1533,6 +1533,8 @@ static void cleanup()
|
||||
my_free(host);
|
||||
my_free(user);
|
||||
my_free(const_cast<char*>(dirname_for_local_load));
|
||||
my_free(start_datetime_str);
|
||||
my_free(stop_datetime_str);
|
||||
|
||||
delete binlog_filter;
|
||||
delete glob_description_event;
|
||||
@@ -1719,7 +1721,7 @@ static int parse_args(int *argc, char*** argv)
|
||||
exit(ho_error);
|
||||
if (debug_info_flag)
|
||||
my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
|
||||
if (debug_check_flag)
|
||||
else if (debug_check_flag)
|
||||
my_end_arg= MY_CHECK_ERROR;
|
||||
return 0;
|
||||
}
|
||||
@@ -2044,6 +2046,7 @@ static Exit_status dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
|
||||
if ((rev->ident_len != logname_len) ||
|
||||
memcmp(rev->new_log_ident, logname, logname_len))
|
||||
{
|
||||
delete ev;
|
||||
DBUG_RETURN(OK_CONTINUE);
|
||||
}
|
||||
/*
|
||||
@@ -2052,6 +2055,7 @@ static Exit_status dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
|
||||
log. If we are running with to_last_remote_log, we print it,
|
||||
because it serves as a useful marker between binlogs then.
|
||||
*/
|
||||
delete ev;
|
||||
continue;
|
||||
}
|
||||
len= 1; // fake Rotate, so don't increment old_off
|
||||
@@ -2082,7 +2086,9 @@ static Exit_status dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
|
||||
Exit_status retval;
|
||||
|
||||
if ((file= load_processor.prepare_new_file_for_old_format(le,fname)) < 0)
|
||||
{
|
||||
DBUG_RETURN(ERROR_STOP);
|
||||
}
|
||||
|
||||
retval= process_event(print_event_info, ev, old_off, logname);
|
||||
if (retval != OK_CONTINUE)
|
||||
@@ -2450,23 +2456,23 @@ int main(int argc, char** argv)
|
||||
if (load_defaults("my", load_groups, &argc, &argv))
|
||||
exit(1);
|
||||
|
||||
defaults_argv= argv;
|
||||
|
||||
if (!(binlog_filter= new Rpl_filter))
|
||||
{
|
||||
error("Failed to create Rpl_filter");
|
||||
exit(1);
|
||||
goto err;
|
||||
}
|
||||
|
||||
defaults_argv= argv;
|
||||
parse_args(&argc, (char***)&argv);
|
||||
|
||||
if (!argc || opt_version)
|
||||
{
|
||||
if (!argc)
|
||||
usage();
|
||||
cleanup();
|
||||
free_defaults(defaults_argv);
|
||||
my_end(my_end_arg);
|
||||
exit(!opt_version);
|
||||
if (!opt_version)
|
||||
retval= ERROR_STOP;
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (opt_base64_output_mode == BASE64_OUTPUT_UNSPEC)
|
||||
@@ -2486,12 +2492,18 @@ int main(int argc, char** argv)
|
||||
if (!dirname_for_local_load)
|
||||
{
|
||||
if (init_tmpdir(&tmpdir, 0))
|
||||
exit(1);
|
||||
{
|
||||
retval= ERROR_STOP;
|
||||
goto err;
|
||||
}
|
||||
dirname_for_local_load= my_strdup(my_tmpdir(&tmpdir), MY_WME);
|
||||
}
|
||||
|
||||
if (load_processor.init())
|
||||
exit(1);
|
||||
{
|
||||
retval= ERROR_STOP;
|
||||
goto err;
|
||||
}
|
||||
if (dirname_for_local_load)
|
||||
load_processor.init_by_dir_name(dirname_for_local_load);
|
||||
else
|
||||
@@ -2561,12 +2573,20 @@ int main(int argc, char** argv)
|
||||
free_defaults(defaults_argv);
|
||||
my_free_open_file_info();
|
||||
load_processor.destroy();
|
||||
mysql_server_end();
|
||||
/* We cannot free DBUG, it is used in global destructors after exit(). */
|
||||
my_end(my_end_arg | MY_DONT_FREE_DBUG);
|
||||
|
||||
exit(retval == ERROR_STOP ? 1 : 0);
|
||||
/* Keep compilers happy. */
|
||||
DBUG_RETURN(retval == ERROR_STOP ? 1 : 0);
|
||||
|
||||
err:
|
||||
cleanup();
|
||||
free_defaults(defaults_argv);
|
||||
my_end(my_end_arg);
|
||||
exit(retval == ERROR_STOP ? 1 : 0);
|
||||
DBUG_RETURN(retval == ERROR_STOP ? 1 : 0);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2013, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2013, Monty Program Ab.
|
||||
Copyright (c) 2010, 2015, 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
|
||||
@@ -148,6 +148,12 @@ static int first_error=0;
|
||||
*/
|
||||
static uint multi_source= 0;
|
||||
static DYNAMIC_STRING extended_row;
|
||||
static DYNAMIC_STRING dynamic_where;
|
||||
static MYSQL_RES *get_table_name_result= NULL;
|
||||
static MEM_ROOT glob_root;
|
||||
static MYSQL_RES *routine_res, *routine_list_res;
|
||||
|
||||
|
||||
#include <sslopt-vars.h>
|
||||
FILE *md_result_file= 0;
|
||||
FILE *stderror_file=0;
|
||||
@@ -1138,16 +1144,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"))
|
||||
@@ -1585,14 +1589,26 @@ static void free_resources()
|
||||
{
|
||||
if (md_result_file && md_result_file != stdout)
|
||||
my_fclose(md_result_file, MYF(0));
|
||||
if (get_table_name_result)
|
||||
mysql_free_result(get_table_name_result);
|
||||
if (routine_res)
|
||||
mysql_free_result(routine_res);
|
||||
if (routine_list_res)
|
||||
mysql_free_result(routine_list_res);
|
||||
if (mysql)
|
||||
{
|
||||
mysql_close(mysql);
|
||||
mysql= 0;
|
||||
}
|
||||
my_free(order_by);
|
||||
my_free(opt_password);
|
||||
my_free(current_host);
|
||||
free_root(&glob_root, MYF(0));
|
||||
if (my_hash_inited(&ignore_table))
|
||||
my_hash_free(&ignore_table);
|
||||
if (extended_insert)
|
||||
dynstr_free(&extended_row);
|
||||
if (insert_pat_inited)
|
||||
dynstr_free(&insert_pat);
|
||||
dynstr_free(&extended_row);
|
||||
dynstr_free(&dynamic_where);
|
||||
dynstr_free(&insert_pat);
|
||||
if (defaults_argv)
|
||||
free_defaults(defaults_argv);
|
||||
mysql_library_end();
|
||||
@@ -1609,8 +1625,6 @@ static void maybe_exit(int error)
|
||||
ignore_errors= 1; /* don't want to recurse, if something fails below */
|
||||
if (opt_slave_data)
|
||||
do_start_slave_sql(mysql);
|
||||
if (mysql)
|
||||
mysql_close(mysql);
|
||||
free_resources();
|
||||
exit(error);
|
||||
}
|
||||
@@ -1703,6 +1717,7 @@ static void dbDisconnect(char *host)
|
||||
{
|
||||
verbose_msg("-- Disconnecting from %s...\n", host ? host : "localhost");
|
||||
mysql_close(mysql);
|
||||
mysql= 0;
|
||||
} /* dbDisconnect */
|
||||
|
||||
|
||||
@@ -2324,6 +2339,8 @@ static uint dump_events_for_db(char *db)
|
||||
(const char *) (query_str != NULL ? query_str : row[3]),
|
||||
(const char *) delimiter);
|
||||
|
||||
my_free(query_str);
|
||||
|
||||
restore_time_zone(sql_file, delimiter);
|
||||
restore_sql_mode(sql_file, delimiter);
|
||||
|
||||
@@ -2408,7 +2425,6 @@ static uint dump_routines_for_db(char *db)
|
||||
char *routine_name;
|
||||
int i;
|
||||
FILE *sql_file= md_result_file;
|
||||
MYSQL_RES *routine_res, *routine_list_res;
|
||||
MYSQL_ROW row, routine_list_row;
|
||||
|
||||
char db_cl_name[MY_CS_NAME_SIZE];
|
||||
@@ -2432,7 +2448,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"))
|
||||
@@ -2463,7 +2479,11 @@ static uint dump_routines_for_db(char *db)
|
||||
routine_type[i], routine_name);
|
||||
|
||||
if (mysql_query_with_error_report(mysql, &routine_res, query_buff))
|
||||
{
|
||||
mysql_free_result(routine_list_res);
|
||||
routine_list_res= 0;
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
while ((row= mysql_fetch_row(routine_res)))
|
||||
{
|
||||
@@ -2481,7 +2501,8 @@ static uint dump_routines_for_db(char *db)
|
||||
print_comment(sql_file, 1,
|
||||
"-- does %s have permissions on mysql.proc?\n\n",
|
||||
current_user);
|
||||
maybe_die(EX_MYSQLERR,"%s has insufficent privileges to %s!", current_user, query_buff);
|
||||
maybe_die(EX_MYSQLERR,"%s has insufficent privileges to %s!",
|
||||
current_user, query_buff);
|
||||
}
|
||||
else if (strlen(row[2]))
|
||||
{
|
||||
@@ -2501,9 +2522,12 @@ 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))
|
||||
{
|
||||
mysql_free_result(routine_res);
|
||||
mysql_free_result(routine_list_res);
|
||||
routine_res= routine_list_res= 0;
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
|
||||
@@ -2548,18 +2572,25 @@ 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))
|
||||
{
|
||||
mysql_free_result(routine_res);
|
||||
mysql_free_result(routine_list_res);
|
||||
routine_res= routine_list_res= 0;
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} /* end of routine printing */
|
||||
mysql_free_result(routine_res);
|
||||
routine_res= 0;
|
||||
|
||||
} /* end of list of routines */
|
||||
}
|
||||
mysql_free_result(routine_list_res);
|
||||
routine_list_res= 0;
|
||||
} /* end of for i (0 .. 1) */
|
||||
|
||||
if (opt_xml)
|
||||
@@ -2681,13 +2712,20 @@ static uint get_table_structure(char *table, char *db, char *table_type,
|
||||
if (switch_character_set_results(mysql, "binary") ||
|
||||
mysql_query_with_error_report(mysql, &result, buff) ||
|
||||
switch_character_set_results(mysql, default_charset))
|
||||
{
|
||||
my_free(order_by);
|
||||
order_by= 0;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
if (path)
|
||||
{
|
||||
if (!(sql_file= open_sql_file_for_table(table, O_WRONLY)))
|
||||
{
|
||||
my_free(order_by);
|
||||
order_by= 0;
|
||||
DBUG_RETURN(0);
|
||||
|
||||
}
|
||||
write_header(sql_file, db);
|
||||
}
|
||||
|
||||
@@ -3257,10 +3295,6 @@ static int dump_trigger(FILE *sql_file, MYSQL_RES *show_create_trigger_rs,
|
||||
continue;
|
||||
}
|
||||
|
||||
query_str= cover_definer_clause(row[2], strlen(row[2]),
|
||||
C_STRING_WITH_LEN("50017"),
|
||||
C_STRING_WITH_LEN("50003"),
|
||||
C_STRING_WITH_LEN(" TRIGGER"));
|
||||
if (switch_db_collation(sql_file, db_name, ";",
|
||||
db_cl_name, row[5], &db_cl_altered))
|
||||
DBUG_RETURN(TRUE);
|
||||
@@ -3272,12 +3306,18 @@ static int dump_trigger(FILE *sql_file, MYSQL_RES *show_create_trigger_rs,
|
||||
|
||||
switch_sql_mode(sql_file, ";", row[1]);
|
||||
|
||||
query_str= cover_definer_clause(row[2], strlen(row[2]),
|
||||
C_STRING_WITH_LEN("50017"),
|
||||
C_STRING_WITH_LEN("50003"),
|
||||
C_STRING_WITH_LEN(" TRIGGER"));
|
||||
fprintf(sql_file,
|
||||
"DELIMITER ;;\n"
|
||||
"/*!50003 %s */;;\n"
|
||||
"DELIMITER ;\n",
|
||||
(const char *) (query_str != NULL ? query_str : row[2]));
|
||||
|
||||
my_free(query_str);
|
||||
|
||||
restore_sql_mode(sql_file, ";");
|
||||
restore_cs_variables(sql_file, ";");
|
||||
|
||||
@@ -3286,8 +3326,6 @@ static int dump_trigger(FILE *sql_file, MYSQL_RES *show_create_trigger_rs,
|
||||
if (restore_db_collation(sql_file, db_name, ";", db_cl_name))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
my_free(query_str);
|
||||
}
|
||||
|
||||
DBUG_RETURN(FALSE);
|
||||
@@ -3378,13 +3416,14 @@ static int dump_triggers_for_table(char *table_name, char *db_name)
|
||||
{
|
||||
MYSQL_RES *show_create_trigger_rs= mysql_store_result(mysql);
|
||||
|
||||
if (!show_create_trigger_rs ||
|
||||
dump_trigger(sql_file, show_create_trigger_rs, db_name, db_cl_name))
|
||||
goto done;
|
||||
|
||||
int error= (!show_create_trigger_rs ||
|
||||
dump_trigger(sql_file, show_create_trigger_rs, db_name,
|
||||
db_cl_name));
|
||||
mysql_free_result(show_create_trigger_rs);
|
||||
if (error)
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (opt_xml)
|
||||
@@ -3631,12 +3670,14 @@ static void dump_table(char *table, char *db)
|
||||
{
|
||||
dynstr_append_checked(&query_string, " ORDER BY ");
|
||||
dynstr_append_checked(&query_string, order_by);
|
||||
my_free(order_by);
|
||||
order_by= 0;
|
||||
}
|
||||
|
||||
if (mysql_real_query(mysql, query_string.str, query_string.length))
|
||||
{
|
||||
DB_error(mysql, "when executing 'SELECT INTO OUTFILE'");
|
||||
dynstr_free(&query_string);
|
||||
DB_error(mysql, "when executing 'SELECT INTO OUTFILE'");
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
}
|
||||
@@ -3662,6 +3703,8 @@ static void dump_table(char *table, char *db)
|
||||
|
||||
dynstr_append_checked(&query_string, " ORDER BY ");
|
||||
dynstr_append_checked(&query_string, order_by);
|
||||
my_free(order_by);
|
||||
order_by= 0;
|
||||
}
|
||||
|
||||
if (!opt_xml && !opt_compact)
|
||||
@@ -3671,6 +3714,7 @@ static void dump_table(char *table, char *db)
|
||||
}
|
||||
if (mysql_query_with_error_report(mysql, 0, query_string.str))
|
||||
{
|
||||
dynstr_free(&query_string);
|
||||
DB_error(mysql, "when retrieving data from server");
|
||||
goto err;
|
||||
}
|
||||
@@ -3680,6 +3724,7 @@ static void dump_table(char *table, char *db)
|
||||
res=mysql_store_result(mysql);
|
||||
if (!res)
|
||||
{
|
||||
dynstr_free(&query_string);
|
||||
DB_error(mysql, "when retrieving data from server");
|
||||
goto err;
|
||||
}
|
||||
@@ -3995,23 +4040,22 @@ err:
|
||||
|
||||
static char *getTableName(int reset)
|
||||
{
|
||||
static MYSQL_RES *res= NULL;
|
||||
MYSQL_ROW row;
|
||||
MYSQL_ROW row;
|
||||
|
||||
if (!res)
|
||||
if (!get_table_name_result)
|
||||
{
|
||||
if (!(res= mysql_list_tables(mysql,NullS)))
|
||||
if (!(get_table_name_result= mysql_list_tables(mysql,NullS)))
|
||||
return(NULL);
|
||||
}
|
||||
if ((row= mysql_fetch_row(res)))
|
||||
if ((row= mysql_fetch_row(get_table_name_result)))
|
||||
return((char*) row[0]);
|
||||
|
||||
if (reset)
|
||||
mysql_data_seek(res,0); /* We want to read again */
|
||||
mysql_data_seek(get_table_name_result,0); /* We want to read again */
|
||||
else
|
||||
{
|
||||
mysql_free_result(res);
|
||||
res= NULL;
|
||||
mysql_free_result(get_table_name_result);
|
||||
get_table_name_result= NULL;
|
||||
}
|
||||
return(NULL);
|
||||
} /* getTableName */
|
||||
@@ -4028,46 +4072,44 @@ static int dump_all_tablespaces()
|
||||
|
||||
static int dump_tablespaces_for_tables(char *db, char **table_names, int tables)
|
||||
{
|
||||
DYNAMIC_STRING where;
|
||||
int r;
|
||||
int i;
|
||||
char name_buff[NAME_LEN*2+3];
|
||||
|
||||
mysql_real_escape_string(mysql, name_buff, db, strlen(db));
|
||||
|
||||
init_dynamic_string_checked(&where, " AND TABLESPACE_NAME IN ("
|
||||
init_dynamic_string_checked(&dynamic_where, " AND TABLESPACE_NAME IN ("
|
||||
"SELECT DISTINCT TABLESPACE_NAME FROM"
|
||||
" INFORMATION_SCHEMA.PARTITIONS"
|
||||
" WHERE"
|
||||
" TABLE_SCHEMA='", 256, 1024);
|
||||
dynstr_append_checked(&where, name_buff);
|
||||
dynstr_append_checked(&where, "' AND TABLE_NAME IN (");
|
||||
dynstr_append_checked(&dynamic_where, name_buff);
|
||||
dynstr_append_checked(&dynamic_where, "' AND TABLE_NAME IN (");
|
||||
|
||||
for (i=0 ; i<tables ; i++)
|
||||
{
|
||||
mysql_real_escape_string(mysql, name_buff,
|
||||
table_names[i], strlen(table_names[i]));
|
||||
|
||||
dynstr_append_checked(&where, "'");
|
||||
dynstr_append_checked(&where, name_buff);
|
||||
dynstr_append_checked(&where, "',");
|
||||
dynstr_append_checked(&dynamic_where, "'");
|
||||
dynstr_append_checked(&dynamic_where, name_buff);
|
||||
dynstr_append_checked(&dynamic_where, "',");
|
||||
}
|
||||
dynstr_trunc(&where, 1);
|
||||
dynstr_append_checked(&where,"))");
|
||||
dynstr_trunc(&dynamic_where, 1);
|
||||
dynstr_append_checked(&dynamic_where,"))");
|
||||
|
||||
DBUG_PRINT("info",("Dump TS for Tables where: %s",where.str));
|
||||
r= dump_tablespaces(where.str);
|
||||
dynstr_free(&where);
|
||||
DBUG_PRINT("info",("Dump TS for Tables where: %s",dynamic_where.str));
|
||||
r= dump_tablespaces(dynamic_where.str);
|
||||
dynstr_free(&dynamic_where);
|
||||
return r;
|
||||
}
|
||||
|
||||
static int dump_tablespaces_for_databases(char** databases)
|
||||
{
|
||||
DYNAMIC_STRING where;
|
||||
int r;
|
||||
int i;
|
||||
|
||||
init_dynamic_string_checked(&where, " AND TABLESPACE_NAME IN ("
|
||||
init_dynamic_string_checked(&dynamic_where, " AND TABLESPACE_NAME IN ("
|
||||
"SELECT DISTINCT TABLESPACE_NAME FROM"
|
||||
" INFORMATION_SCHEMA.PARTITIONS"
|
||||
" WHERE"
|
||||
@@ -4078,16 +4120,16 @@ static int dump_tablespaces_for_databases(char** databases)
|
||||
char db_name_buff[NAME_LEN*2+3];
|
||||
mysql_real_escape_string(mysql, db_name_buff,
|
||||
databases[i], strlen(databases[i]));
|
||||
dynstr_append_checked(&where, "'");
|
||||
dynstr_append_checked(&where, db_name_buff);
|
||||
dynstr_append_checked(&where, "',");
|
||||
dynstr_append_checked(&dynamic_where, "'");
|
||||
dynstr_append_checked(&dynamic_where, db_name_buff);
|
||||
dynstr_append_checked(&dynamic_where, "',");
|
||||
}
|
||||
dynstr_trunc(&where, 1);
|
||||
dynstr_append_checked(&where,"))");
|
||||
dynstr_trunc(&dynamic_where, 1);
|
||||
dynstr_append_checked(&dynamic_where,"))");
|
||||
|
||||
DBUG_PRINT("info",("Dump TS for DBs where: %s",where.str));
|
||||
r= dump_tablespaces(where.str);
|
||||
dynstr_free(&where);
|
||||
DBUG_PRINT("info",("Dump TS for DBs where: %s",dynamic_where.str));
|
||||
r= dump_tablespaces(dynamic_where.str);
|
||||
dynstr_free(&dynamic_where);
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -4495,9 +4537,12 @@ static int dump_all_tables_in_db(char *database)
|
||||
}
|
||||
}
|
||||
if (numrows && mysql_real_query(mysql, query.str, query.length-1))
|
||||
{
|
||||
dynstr_free(&query);
|
||||
DB_error(mysql, "when using LOCK TABLES");
|
||||
/* We shall continue here, if --force was given */
|
||||
dynstr_free(&query);
|
||||
/* We shall continue here, if --force was given */
|
||||
}
|
||||
dynstr_free(&query); /* Safe to call twice */
|
||||
}
|
||||
if (flush_logs)
|
||||
{
|
||||
@@ -4511,7 +4556,9 @@ static int dump_all_tables_in_db(char *database)
|
||||
{
|
||||
verbose_msg("-- Setting savepoint...\n");
|
||||
if (mysql_query_with_error_report(mysql, 0, "SAVEPOINT sp"))
|
||||
{
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
}
|
||||
while ((table= getTableName(0)))
|
||||
{
|
||||
@@ -4746,22 +4793,22 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
{
|
||||
char table_buff[NAME_LEN*2+3];
|
||||
DYNAMIC_STRING lock_tables_query;
|
||||
MEM_ROOT root;
|
||||
char **dump_tables, **pos, **end;
|
||||
DBUG_ENTER("dump_selected_tables");
|
||||
|
||||
if (init_dumping(db, init_dumping_tables))
|
||||
DBUG_RETURN(1);
|
||||
|
||||
init_alloc_root(&root, 8192, 0, MYF(0));
|
||||
if (!(dump_tables= pos= (char**) alloc_root(&root, tables * sizeof(char *))))
|
||||
init_alloc_root(&glob_root, 8192, 0, MYF(0));
|
||||
if (!(dump_tables= pos= (char**) alloc_root(&glob_root,
|
||||
tables * sizeof(char *))))
|
||||
die(EX_EOM, "alloc_root failure.");
|
||||
|
||||
init_dynamic_string_checked(&lock_tables_query, "LOCK TABLES ", 256, 1024);
|
||||
for (; tables > 0 ; tables-- , table_names++)
|
||||
{
|
||||
/* the table name passed on commandline may be wrong case */
|
||||
if ((*pos= get_actual_table_name(*table_names, &root)))
|
||||
if ((*pos= get_actual_table_name(*table_names, &glob_root)))
|
||||
{
|
||||
/* Add found table name to lock_tables_query */
|
||||
if (lock_tables)
|
||||
@@ -4776,7 +4823,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
if (!ignore_errors)
|
||||
{
|
||||
dynstr_free(&lock_tables_query);
|
||||
free_root(&root, MYF(0));
|
||||
free_root(&glob_root, MYF(0));
|
||||
}
|
||||
maybe_die(EX_ILLEGAL_TABLE, "Couldn't find table: \"%s\"", *table_names);
|
||||
/* We shall countinue here, if --force was given */
|
||||
@@ -4797,7 +4844,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
if (!ignore_errors)
|
||||
{
|
||||
dynstr_free(&lock_tables_query);
|
||||
free_root(&root, MYF(0));
|
||||
free_root(&glob_root, MYF(0));
|
||||
}
|
||||
DB_error(mysql, "when doing LOCK TABLES");
|
||||
/* We shall countinue here, if --force was given */
|
||||
@@ -4809,7 +4856,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
if (mysql_refresh(mysql, REFRESH_LOG))
|
||||
{
|
||||
if (!ignore_errors)
|
||||
free_root(&root, MYF(0));
|
||||
free_root(&glob_root, MYF(0));
|
||||
DB_error(mysql, "when doing refresh");
|
||||
}
|
||||
/* We shall countinue here, if --force was given */
|
||||
@@ -4823,7 +4870,10 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
{
|
||||
verbose_msg("-- Setting savepoint...\n");
|
||||
if (mysql_query_with_error_report(mysql, 0, "SAVEPOINT sp"))
|
||||
{
|
||||
free_root(&glob_root, MYF(0));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Dump each selected table */
|
||||
@@ -4838,6 +4888,8 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
{
|
||||
if (path)
|
||||
my_fclose(md_result_file, MYF(MY_WME));
|
||||
if (!ignore_errors)
|
||||
free_root(&glob_root, MYF(0));
|
||||
maybe_exit(EX_MYSQLERR);
|
||||
}
|
||||
}
|
||||
@@ -4856,7 +4908,11 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
{
|
||||
verbose_msg("-- Rolling back to savepoint sp...\n");
|
||||
if (mysql_query_with_error_report(mysql, 0, "ROLLBACK TO SAVEPOINT sp"))
|
||||
{
|
||||
if (!ignore_errors)
|
||||
free_root(&glob_root, MYF(0));
|
||||
maybe_exit(EX_MYSQLERR);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4864,8 +4920,10 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
{
|
||||
verbose_msg("-- Releasing savepoint...\n");
|
||||
if (mysql_query_with_error_report(mysql, 0, "RELEASE SAVEPOINT sp"))
|
||||
{
|
||||
free_root(&glob_root, MYF(0));
|
||||
DBUG_RETURN(1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* Dump each selected view */
|
||||
@@ -4885,9 +4943,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
DBUG_PRINT("info", ("Dumping routines for database %s", db));
|
||||
dump_routines_for_db(db);
|
||||
}
|
||||
free_root(&root, MYF(0));
|
||||
my_free(order_by);
|
||||
order_by= 0;
|
||||
free_root(&glob_root, MYF(0));
|
||||
if (opt_xml)
|
||||
{
|
||||
fputs("</database>\n", md_result_file);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2012, Monty Program Ab
|
||||
Copyright (c) 2000, 2015, Oracle and/or its affiliates.
|
||||
Copyright (c) 2010, 2015, MariaDB
|
||||
|
||||
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
|
||||
@@ -68,10 +68,12 @@ int main(int argc, char **argv)
|
||||
my_bool first_argument_uses_wildcards=0;
|
||||
char *wild;
|
||||
MYSQL mysql;
|
||||
static char **defaults_argv;
|
||||
MY_INIT(argv[0]);
|
||||
sf_leaking_memory=1; /* don't report memory leaks on early exits */
|
||||
if (load_defaults("my",load_default_groups,&argc,&argv))
|
||||
exit(1);
|
||||
defaults_argv=argv;
|
||||
|
||||
get_options(&argc,&argv);
|
||||
|
||||
@@ -150,7 +152,8 @@ int main(int argc, char **argv)
|
||||
0)))
|
||||
{
|
||||
fprintf(stderr,"%s: %s\n",my_progname,mysql_error(&mysql));
|
||||
exit(1);
|
||||
error= 1;
|
||||
goto error;
|
||||
}
|
||||
mysql.reconnect= 1;
|
||||
|
||||
@@ -169,11 +172,14 @@ int main(int argc, char **argv)
|
||||
error=list_fields(&mysql,argv[0],argv[1],wild);
|
||||
break;
|
||||
}
|
||||
error:
|
||||
mysql_close(&mysql); /* Close & free connection */
|
||||
my_free(opt_password);
|
||||
mysql_server_end();
|
||||
#ifdef HAVE_SMEM
|
||||
my_free(shared_memory_base_name);
|
||||
#endif
|
||||
free_defaults(defaults_argv);
|
||||
my_end(my_end_arg);
|
||||
exit(error ? 1 : 0);
|
||||
return 0; /* No compiler warnings */
|
||||
@@ -376,7 +382,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;
|
||||
@@ -443,7 +449,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;
|
||||
@@ -499,7 +506,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;
|
||||
@@ -584,7 +591,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)))
|
||||
@@ -644,13 +652,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",
|
||||
@@ -682,7 +692,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);
|
||||
@@ -696,7 +707,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table,
|
||||
|
||||
if (opt_count)
|
||||
{
|
||||
sprintf(query,"select count(*) from `%s`", table);
|
||||
my_snprintf(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",
|
||||
@@ -708,9 +719,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",
|
||||
@@ -731,7 +744,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",
|
||||
|
@@ -168,6 +168,7 @@ static ulonglong auto_generate_sql_number;
|
||||
const char *concurrency_str= NULL;
|
||||
static char *create_string;
|
||||
uint *concurrency;
|
||||
static char mysql_charsets_dir[FN_REFLEN+1];
|
||||
|
||||
const char *default_dbug_option="d:t:o,/tmp/mysqlslap.trace";
|
||||
const char *opt_csv_str;
|
||||
@@ -372,6 +373,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
fprintf(stderr,"%s: Error when connecting to server: %s\n",
|
||||
my_progname,mysql_error(&mysql));
|
||||
mysql_close(&mysql);
|
||||
free_defaults(defaults_argv);
|
||||
my_end(0);
|
||||
exit(1);
|
||||
@@ -417,8 +419,7 @@ int main(int argc, char **argv)
|
||||
pthread_mutex_destroy(&sleeper_mutex);
|
||||
pthread_cond_destroy(&sleep_threshhold);
|
||||
|
||||
if (!opt_only_print)
|
||||
mysql_close(&mysql); /* Close & free connection */
|
||||
mysql_close(&mysql); /* Close & free connection */
|
||||
|
||||
/* now free all the strings we created */
|
||||
my_free(opt_password);
|
||||
@@ -585,6 +586,9 @@ static struct my_option my_long_options[] =
|
||||
"Number of row inserts to perform for each thread (default is 100).",
|
||||
&auto_generate_sql_number, &auto_generate_sql_number,
|
||||
0, GET_ULL, REQUIRED_ARG, 100, 0, 0, 0, 0, 0},
|
||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||
"Directory for character set files.", &charsets_dir,
|
||||
&charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"commit", OPT_SLAP_COMMIT, "Commit records every X number of statements.",
|
||||
&commit_rate, &commit_rate, 0, GET_UINT, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
@@ -782,6 +786,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
DBUG_PUSH(argument ? argument : default_dbug_option);
|
||||
debug_check_flag= 1;
|
||||
break;
|
||||
case OPT_CHARSETS_DIR:
|
||||
strmake_buf(mysql_charsets_dir, argument);
|
||||
charsets_dir = mysql_charsets_dir;
|
||||
break;
|
||||
case OPT_SLAP_CSV:
|
||||
if (!argument)
|
||||
argument= (char *)"-"; /* use stdout */
|
||||
@@ -1863,21 +1871,21 @@ pthread_handler_t run_task(void *p)
|
||||
}
|
||||
pthread_mutex_unlock(&sleeper_mutex);
|
||||
|
||||
if (!(mysql= mysql_init(NULL)))
|
||||
{
|
||||
fprintf(stderr,"%s: mysql_init() failed ERROR : %s\n",
|
||||
my_progname, mysql_error(mysql));
|
||||
exit(0);
|
||||
}
|
||||
set_mysql_connect_options(mysql);
|
||||
|
||||
if (mysql_thread_init())
|
||||
{
|
||||
fprintf(stderr,"%s: mysql_thread_init() failed ERROR : %s\n",
|
||||
my_progname, mysql_error(mysql));
|
||||
fprintf(stderr,"%s: mysql_thread_init() failed\n", my_progname);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (!(mysql= mysql_init(NULL)))
|
||||
{
|
||||
fprintf(stderr,"%s: mysql_init() failed\n", my_progname);
|
||||
mysql_thread_end();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
set_mysql_connect_options(mysql);
|
||||
|
||||
DBUG_PRINT("info", ("trying to connect to host %s as user %s", host, user));
|
||||
|
||||
if (!opt_only_print)
|
||||
@@ -1995,8 +2003,7 @@ end:
|
||||
if (commit_rate)
|
||||
run_query(mysql, "COMMIT", strlen("COMMIT"));
|
||||
|
||||
if (!opt_only_print)
|
||||
mysql_close(mysql);
|
||||
mysql_close(mysql);
|
||||
|
||||
mysql_thread_end();
|
||||
|
||||
|
@@ -5246,7 +5246,7 @@ static st_error global_error_names[] =
|
||||
#include <my_base.h>
|
||||
static st_error handler_error_names[] =
|
||||
{
|
||||
{ "<No error>", -1U, "" },
|
||||
{ "<No error>", UINT_MAX, "" },
|
||||
#include <handler_ername.h>
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
@@ -29,7 +29,7 @@ SET(CPACK_RPM_PACKAGE_NAME "MariaDB-Galera")
|
||||
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 "GPLv2")
|
||||
SET(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)
|
||||
SET(CPACK_PACKAGE_RELOCATABLE FALSE)
|
||||
SET(CPACK_RPM_PACKAGE_GROUP "Applications/Databases")
|
||||
|
@@ -96,8 +96,11 @@ IF(MSVC)
|
||||
STRING(REGEX REPLACE "/STACK:([^ ]+)" "" CMAKE_${type}_LINKER_FLAGS "${CMAKE_${type}_LINKER_FLAGS}")
|
||||
STRING(REGEX REPLACE "/INCREMENTAL:([^ ]+)" "/INCREMENTAL:NO" CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO}")
|
||||
STRING(REGEX REPLACE "/INCREMENTAL$" "/INCREMENTAL:NO" CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO}")
|
||||
STRING(REGEX REPLACE "/INCREMENTAL:([^ ]+)" "/INCREMENTAL:NO" CMAKE_${type}_LINKER_FLAGS_DEBUG "${CMAKE_${type}_LINKER_FLAGS_DEBUG}")
|
||||
STRING(REGEX REPLACE "/INCREMENTAL$" "/INCREMENTAL:NO" CMAKE_${type}_LINKER_FLAGS_DEBUG "${CMAKE_${type}_LINKER_FLAGS_DEBUG}")
|
||||
SET(CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO} /OPT:REF /release")
|
||||
ENDFOREACH()
|
||||
|
||||
|
||||
# Mark 32 bit executables large address aware so they can
|
||||
# use > 2GB address space
|
||||
@@ -113,7 +116,7 @@ IF(MSVC)
|
||||
|
||||
#TODO: update the code and remove the disabled warnings
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /we4099")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /we4099")
|
||||
|
||||
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
# _WIN64 is defined by the compiler itself.
|
||||
@@ -181,14 +184,14 @@ CHECK_SYMBOL_REPLACEMENT(S_IROTH _S_IREAD sys/stat.h)
|
||||
CHECK_SYMBOL_REPLACEMENT(S_IFIFO _S_IFIFO sys/stat.h)
|
||||
CHECK_SYMBOL_REPLACEMENT(SIGQUIT SIGTERM signal.h)
|
||||
CHECK_SYMBOL_REPLACEMENT(SIGPIPE SIGINT signal.h)
|
||||
CHECK_SYMBOL_REPLACEMENT(isnan _isnan float.h)
|
||||
CHECK_SYMBOL_REPLACEMENT(finite _finite float.h)
|
||||
CHECK_SYMBOL_REPLACEMENT(isnan _isnan "math.h;float.h")
|
||||
CHECK_SYMBOL_REPLACEMENT(finite _finite "math;float.h")
|
||||
CHECK_FUNCTION_REPLACEMENT(popen _popen)
|
||||
CHECK_FUNCTION_REPLACEMENT(pclose _pclose)
|
||||
CHECK_FUNCTION_REPLACEMENT(access _access)
|
||||
CHECK_FUNCTION_REPLACEMENT(strcasecmp _stricmp)
|
||||
CHECK_FUNCTION_REPLACEMENT(strncasecmp _strnicmp)
|
||||
CHECK_FUNCTION_REPLACEMENT(snprintf _snprintf)
|
||||
CHECK_SYMBOL_REPLACEMENT(snprintf _snprintf stdio.h)
|
||||
CHECK_FUNCTION_REPLACEMENT(strtok_r strtok_s)
|
||||
CHECK_FUNCTION_REPLACEMENT(strtoll _strtoi64)
|
||||
CHECK_FUNCTION_REPLACEMENT(strtoull _strtoui64)
|
||||
|
@@ -102,7 +102,6 @@ SET(HAVE_IPPROTO_IPV6 CACHE INTERNAL "")
|
||||
SET(HAVE_IPV6 TRUE CACHE INTERNAL "")
|
||||
SET(HAVE_IPV6_V6ONLY 1 CACHE INTERNAL "")
|
||||
SET(HAVE_ISINF CACHE INTERNAL "")
|
||||
SET(HAVE_ISNAN CACHE INTERNAL "")
|
||||
SET(HAVE_ISSETUGID CACHE INTERNAL "")
|
||||
SET(HAVE_GETUID CACHE INTERNAL "")
|
||||
SET(HAVE_GETEUID CACHE INTERNAL "")
|
||||
@@ -232,7 +231,6 @@ SET(HAVE_SIZEOF_ULONG FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_U_INT32_T FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZE_OF_SSIZE_T FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SLEEP CACHE INTERNAL "")
|
||||
SET(HAVE_SNPRINTF CACHE INTERNAL "")
|
||||
SET(HAVE_SOCKADDR_STORAGE_SS_FAMILY 1 CACHE INTERNAL "")
|
||||
SET(HAVE_SOLARIS_STYLE_GETHOST CACHE INTERNAL "")
|
||||
SET(STACK_DIRECTION -1 CACHE INTERNAL "")
|
||||
@@ -325,10 +323,8 @@ SET(WORDS_BIGENDIAN CACHE INTERNAL "")
|
||||
SET(HAVE__S_IFIFO 1 CACHE INTERNAL "")
|
||||
SET(HAVE__S_IREAD 1 CACHE INTERNAL "")
|
||||
SET(HAVE__finite 1 CACHE INTERNAL "")
|
||||
SET(HAVE__isnan 1 CACHE INTERNAL "")
|
||||
SET(HAVE__pclose 1 CACHE INTERNAL "")
|
||||
SET(HAVE__popen 1 CACHE INTERNAL "")
|
||||
SET(HAVE__snprintf 1 CACHE INTERNAL "")
|
||||
SET(HAVE__stricmp 1 CACHE INTERNAL "")
|
||||
SET(HAVE__strnicmp 1 CACHE INTERNAL "")
|
||||
SET(HAVE__strtoi64 1 CACHE INTERNAL "")
|
||||
|
@@ -318,6 +318,8 @@
|
||||
#cmakedefine HAVE_TIMESPEC_TS_SEC 1
|
||||
#cmakedefine STRUCT_DIRENT_HAS_D_INO 1
|
||||
#cmakedefine STRUCT_DIRENT_HAS_D_NAMLEN 1
|
||||
#cmakedefine STRUCT_TIMESPEC_HAS_TV_SEC 1
|
||||
#cmakedefine STRUCT_TIMESPEC_HAS_TV_NSEC 1
|
||||
#cmakedefine SPRINTF_RETURNS_INT 1
|
||||
|
||||
#define USE_MB 1
|
||||
@@ -405,6 +407,7 @@
|
||||
#cmakedefine SIGNAL_RETURN_TYPE_IS_VOID 1
|
||||
#cmakedefine RETSIGTYPE @RETSIGTYPE@
|
||||
#cmakedefine VOID_SIGHANDLER 1
|
||||
#cmakedefine HAVE_SIGHANDLER_T 1
|
||||
#define STRUCT_RLIMIT struct rlimit
|
||||
|
||||
#ifdef __APPLE__
|
||||
@@ -490,6 +493,7 @@
|
||||
|
||||
#define SYSTEM_TYPE "@SYSTEM_TYPE@"
|
||||
#define MACHINE_TYPE "@CMAKE_SYSTEM_PROCESSOR@"
|
||||
#define DEFAULT_MACHINE "@DEFAULT_MACHINE@"
|
||||
#cmakedefine HAVE_DTRACE 1
|
||||
|
||||
#cmakedefine SIGNAL_WITH_VIO_CLOSE 1
|
||||
@@ -515,6 +519,10 @@
|
||||
#cmakedefine strtoll @strtoll@
|
||||
#cmakedefine strtoull @strtoull@
|
||||
#cmakedefine vsnprintf @vsnprintf@
|
||||
#if (_MSC_VER > 1800)
|
||||
#define tzname _tzname
|
||||
#define P_tmpdir "C:\\TEMP"
|
||||
#endif
|
||||
#if (_MSC_VER > 1310)
|
||||
# define HAVE_SETENV
|
||||
#define setenv(a,b,c) _putenv_s(a,b)
|
||||
@@ -523,7 +531,7 @@
|
||||
|
||||
/* We don't want the min/max macros */
|
||||
#ifdef __WIN__
|
||||
#define NOMINMAX
|
||||
#define NOMINMAX 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@@ -549,6 +549,7 @@ MY_CHECK_TYPE_SIZE(mode_t MODE_T)
|
||||
IF(NOT SIZEOF_MODE_T)
|
||||
SET(mode_t int)
|
||||
ENDIF()
|
||||
MY_CHECK_TYPE_SIZE(sighandler_t SIGHANDLER_T)
|
||||
|
||||
IF(HAVE_NETINET_IN_H)
|
||||
SET(CMAKE_EXTRA_INCLUDE_FILES netinet/in.h)
|
||||
@@ -1058,3 +1059,5 @@ CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h" STRUCT_DIRENT_HAS_D_IN
|
||||
CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h" STRUCT_DIRENT_HAS_D_NAMLEN)
|
||||
SET(SPRINTF_RETURNS_INT 1)
|
||||
CHECK_INCLUDE_FILE(ucontext.h HAVE_UCONTEXT_H)
|
||||
CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_sec "time.h" STRUCT_TIMESPEC_HAS_TV_SEC)
|
||||
CHECK_STRUCT_HAS_MEMBER("struct timespec" tv_nsec "time.h" STRUCT_TIMESPEC_HAS_TV_NSEC)
|
||||
|
13
debian/autobake-deb.sh
vendored
13
debian/autobake-deb.sh
vendored
@@ -39,11 +39,15 @@ case "${CODENAME}" in
|
||||
*) LIBREADLINE_DEV=libreadline-gplv2-dev ;;
|
||||
esac
|
||||
|
||||
sed -i -e "s/\\\${LIBREADLINE_DEV}/${LIBREADLINE_DEV}/g" debian/control
|
||||
|
||||
case "${CODENAME}" in
|
||||
etch|lenny|hardy|intrepid|jaunty|karmic) CMAKE_DEP='' ;;
|
||||
*) CMAKE_DEP='cmake (>= 2.7), ' ;;
|
||||
esac
|
||||
|
||||
sed -i -e "s/\\\${CMAKE_DEP}/${CMAKE_DEP}/g" debian/control
|
||||
|
||||
# Clean up build file symlinks that are distro-specific. First remove all, then set
|
||||
# new links.
|
||||
DISTRODIRS="$(ls ./debian/dist)"
|
||||
@@ -60,9 +64,7 @@ echo "Copying distribution specific build files for ${DISTRO}"
|
||||
DISTROFILES="$(ls ./debian/dist/${DISTRO})"
|
||||
for distrofile in ${DISTROFILES}; do
|
||||
rm -f "./debian/${distrofile}"
|
||||
sed -e "s/\\\${LIBREADLINE_DEV}/${LIBREADLINE_DEV}/g" \
|
||||
-e "s/\\\${CMAKE_DEP}/${CMAKE_DEP}/g" \
|
||||
< "./debian/dist/${DISTRO}/${distrofile}" > "./debian/${distrofile}"
|
||||
cat "./debian/dist/${DISTRO}/${distrofile}" > "./debian/${distrofile}"
|
||||
chmod --reference="./debian/dist/${DISTRO}/${distrofile}" "./debian/${distrofile}"
|
||||
done;
|
||||
|
||||
@@ -75,8 +77,9 @@ dch -b -D ${CODENAME} -v "${UPSTREAM}${PATCHLEVEL}-${RELEASE_NAME}${RELEASE_EXTR
|
||||
echo "Creating package version ${UPSTREAM}${PATCHLEVEL}-${RELEASE_NAME}${RELEASE_EXTRA:+-${RELEASE_EXTRA}}1~${CODENAME} ... "
|
||||
|
||||
# Build the package.
|
||||
#
|
||||
fakeroot dpkg-buildpackage -us -uc
|
||||
# Pass -I so that .git and other unnecessary temporary and source control files
|
||||
# will be ignored by dpkg-source when createing the tar.gz source package
|
||||
fakeroot dpkg-buildpackage -us -uc -I
|
||||
|
||||
[ -e debian/autorm-file ] && rm -vf `cat debian/autorm-file`
|
||||
|
||||
|
180
debian/control
vendored
Normal file
180
debian/control
vendored
Normal file
@@ -0,0 +1,180 @@
|
||||
Source: mariadb-10.0
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
|
||||
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
|
||||
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
|
||||
Build-Depends: bison,
|
||||
chrpath,
|
||||
debhelper,
|
||||
dpatch,
|
||||
gawk,
|
||||
hardening-wrapper,
|
||||
libjemalloc-dev (>= 3.0.0),
|
||||
libncurses5-dev (>= 5.0-6),
|
||||
libpam0g-dev,
|
||||
libssl-dev,
|
||||
libwrap0-dev (>= 7.6-8.3),
|
||||
lsb-release,
|
||||
perl (>= 5.6.0),
|
||||
po-debconf,
|
||||
procps | hurd,
|
||||
psmisc,
|
||||
zlib1g-dev (>= 1:1.1.3-5),
|
||||
${CMAKE_DEP}libaio-dev,
|
||||
${LIBREADLINE_DEV}
|
||||
Standards-Version: 3.8.3
|
||||
Homepage: http://mariadb.org/
|
||||
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/10.0/files
|
||||
Vcs-Bzr: bzr://lp:maria
|
||||
|
||||
Package: mariadb-galera-test-10.0
|
||||
Section: database
|
||||
Architecture: any
|
||||
Depends: mariadb-galera-server-10.0 (= ${source:Version}),
|
||||
mariadb-client-10.0 (>= ${source:Version})
|
||||
Suggests: patch
|
||||
Conflicts: mariadb-test,
|
||||
mariadb-galera-test (<< ${source:Version}),
|
||||
mariadb-test-5.1,
|
||||
mariadb-test-5.2,
|
||||
mariadb-test-5.3,
|
||||
mariadb-test-5.5,
|
||||
mariadb-test-10.0,
|
||||
mariadb-server-5.5,
|
||||
mariadb-galera-server-5.5,
|
||||
mariadb-server-10.0
|
||||
Replaces: mariadb-test (<< ${source:Version}),
|
||||
mariadb-galera-test (<< ${source:Version}),
|
||||
mariadb-test-5.1,
|
||||
mariadb-test-5.2,
|
||||
mariadb-test-5.3,
|
||||
mariadb-test-5.5
|
||||
Description: MariaDB database regression test suite
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
ease of use.
|
||||
.
|
||||
This package includes the regression test suite.
|
||||
|
||||
Package: mariadb-galera-server-10.0
|
||||
Architecture: any
|
||||
Suggests: mailx, mariadb-galera-test, tinyca, netcat-openbsd, socat
|
||||
Recommends: libhtml-template-perl
|
||||
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
|
||||
Depends: bsdutils,
|
||||
libdbi-perl,
|
||||
lsb-base (>= 3.0-10),
|
||||
mariadb-client-10.0 (>= ${source:Version}),
|
||||
passwd,
|
||||
perl (>= 5.6),
|
||||
psmisc,
|
||||
${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
libmariadbclient18 (>= ${binary:Version}),
|
||||
coreutils,
|
||||
findutils,
|
||||
galera-3 (>=25.3),
|
||||
gawk,
|
||||
grep,
|
||||
iproute,
|
||||
lsof,
|
||||
rsync,
|
||||
tar
|
||||
Provides: mariadb-server,
|
||||
mariadb-galera-server,
|
||||
mysql-server,
|
||||
virtual-mysql-server,
|
||||
mysql-server-core,
|
||||
mysql-server-core-5.1,
|
||||
mysql-server-core-5.5,
|
||||
mysql-server-core-10.0
|
||||
Conflicts: mariadb-galera-server (<< ${source:Version}),
|
||||
mariadb-server,
|
||||
mariadb-server-5.1,
|
||||
mariadb-server-5.2,
|
||||
mariadb-server-5.3,
|
||||
mariadb-server-5.5,
|
||||
mariadb-tokudb-engine-10.0,
|
||||
mariadb-tokudb-engine-5.5,
|
||||
mysql-server (<< ${source:Version}),
|
||||
mysql-server-4.1,
|
||||
mysql-server-5.0,
|
||||
mysql-server-5.1,
|
||||
mysql-server-5.5,
|
||||
mysql-server-5.6,
|
||||
mariadb-server-core-5.1,
|
||||
mariadb-server-core-5.2,
|
||||
mariadb-server-core-5.5,
|
||||
mariadb-server-core-10.0,
|
||||
mysql-server-core-5.0,
|
||||
mysql-server-core-5.1,
|
||||
mysql-server-core-5.5,
|
||||
mysql-server-core-5.6
|
||||
Replaces: libmariadbclient-dev (<< 5.5.0),
|
||||
libmariadbclient16 (<< 5.3.4),
|
||||
mariadb-galera-server (<< ${source:Version}),
|
||||
mariadb-server,
|
||||
mariadb-server-5.1,
|
||||
mariadb-server-5.2,
|
||||
mariadb-server-5.3,
|
||||
mariadb-server-5.5,
|
||||
mariadb-tokudb-engine-10.0,
|
||||
mariadb-tokudb-engine-5.5,
|
||||
mysql-server,
|
||||
mysql-server-4.1,
|
||||
mysql-server-5.0,
|
||||
mysql-server-5.1,
|
||||
mysql-server-5.5,
|
||||
mysql-server-5.6,
|
||||
mariadb-server-core-5.1,
|
||||
mariadb-server-core-5.2,
|
||||
mariadb-server-core-5.5,
|
||||
mariadb-server-core-10.0,
|
||||
mysql-server-core-5.0,
|
||||
mysql-server-core-5.1,
|
||||
mysql-server-core-5.5,
|
||||
mysql-server-core-5.6
|
||||
Description: MariaDB database server with Galera cluster binaries
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
ease of use.
|
||||
.
|
||||
This package includes the server binaries.
|
||||
|
||||
Package: mariadb-galera-server
|
||||
Section: database
|
||||
Architecture: all
|
||||
Depends: mariadb-galera-server-10.0 (= ${source:Version}), ${misc:Depends}
|
||||
Description: MariaDB database server with Galera cluster (metapackage depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mariadb-galera-server (currently mariadb-galera-server-10.0), as determined by the MariaDB
|
||||
maintainers. Install this package if in doubt about which MariaDB-Galera
|
||||
version you need. That will install the version recommended by the
|
||||
package maintainers.
|
||||
.
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
ease of use.
|
||||
|
||||
Package: mariadb-client
|
||||
Section: database
|
||||
Architecture: all
|
||||
Depends: mariadb-client-10.0 (= ${source:Version}), ${misc:Depends}
|
||||
Description: MariaDB database client (metapackage depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mariadb-client (currently mariadb-client-10.0), as determined by the MariaDB
|
||||
maintainers. Install this package if in doubt about which MariaDB version
|
||||
you want, as this is the one we consider to be in the best shape.
|
||||
|
||||
Package: mariadb-galera-test
|
||||
Section: database
|
||||
Architecture: all
|
||||
Depends: mariadb-galera-test-10.0 (= ${source:Version})
|
||||
Description: MariaDB database regression test suite (metapackage depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mariadb-galera-test (currently mariadb-galera-test-10.0), as determined by the MariaDB
|
||||
maintainers.
|
16
debian/copyright
vendored
16
debian/copyright
vendored
@@ -2,7 +2,7 @@
|
||||
== MariaDB ==
|
||||
|
||||
The Debian package of MySQL was first debianzed on 1997-04-12 by Christian
|
||||
Schwarz <schwarz@debian.org> and ist maintained since 1999-04-20 by
|
||||
Schwarz <schwarz@debian.org> and ist maintained since 1999-04-20 by
|
||||
Christian Hammers <ch@debian.org>.
|
||||
|
||||
The MariaDB packages were initally made by http://ourdelta.org/, and
|
||||
@@ -17,22 +17,22 @@ According to the file "COPYING" all parts of this package are licenced
|
||||
under the terms of the GNU GPL Version 2 of which a copy is available
|
||||
in /usr/share/common-licenses.
|
||||
|
||||
To allow free software with other licences than the GPL to link against the
|
||||
To allow free software with other licences than the GPL to link against the
|
||||
shared library, special terms for "derived works" are granted in the README file of MySQL 5.5, as follows:
|
||||
|
||||
> MySQL FOSS License Exception
|
||||
> We want free and open source software applications under certain
|
||||
> licenses to be able to use specified GPL-licensed MySQL client
|
||||
> libraries despite the fact that not all such FOSS licenses are
|
||||
> compatible with version 2 of the GNU General Public License.
|
||||
> Therefore there are special exceptions to the terms and conditions
|
||||
> of the GPLv2 as applied to these client libraries, which are
|
||||
> identified and described in more detail in the FOSS License
|
||||
> Exception at
|
||||
> compatible with version 2 of the GNU General Public License.
|
||||
> Therefore there are special exceptions to the terms and conditions
|
||||
> of the GPLv2 as applied to these client libraries, which are
|
||||
> identified and described in more detail in the FOSS License
|
||||
> Exception at
|
||||
> <http://www.mysql.com/about/legal/licensing/foss-exception.html>.
|
||||
|
||||
The manual had to be removed as it is not free in the sense of the
|
||||
Debian Free Software Guidelines (DFSG).
|
||||
Debian Free Software Guidelines (DFSG).
|
||||
|
||||
|
||||
== innotop ==
|
||||
|
118
debian/dist/Debian/control
vendored
118
debian/dist/Debian/control
vendored
@@ -1,118 +0,0 @@
|
||||
Source: mariadb-10.0
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
|
||||
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
|
||||
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
|
||||
Build-Depends: procps | hurd, debhelper, libncurses5-dev (>= 5.0-6),
|
||||
perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3),
|
||||
zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV},
|
||||
libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath,
|
||||
dpatch, gawk, bison, lsb-release, hardening-wrapper,
|
||||
${CMAKE_DEP}libaio-dev, libjemalloc-dev (>= 3.0.0)
|
||||
Standards-Version: 3.8.3
|
||||
Homepage: http://mariadb.org/
|
||||
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/10.0/files
|
||||
Vcs-Bzr: bzr://lp:maria
|
||||
|
||||
Package: mariadb-galera-test-10.0
|
||||
Section: database
|
||||
Architecture: any
|
||||
Depends: mariadb-galera-server-10.0 (= ${source:Version}), mariadb-client-10.0 (>= ${source:Version})
|
||||
Suggests: patch
|
||||
Conflicts: mariadb-test, mariadb-galera-test (<< ${source:Version}),
|
||||
mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3,
|
||||
mariadb-test-5.5, mariadb-test-10.0,
|
||||
mariadb-server-5.5, mariadb-galera-server-5.5,
|
||||
mariadb-server-10.0
|
||||
Replaces: mariadb-test (<< ${source:Version}), mariadb-galera-test (<< ${source:Version}),
|
||||
mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3,
|
||||
mariadb-test-5.5
|
||||
Description: MariaDB database regression test suite
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
ease of use.
|
||||
.
|
||||
This package includes the regression test suite.
|
||||
|
||||
Package: mariadb-galera-server-10.0
|
||||
Architecture: any
|
||||
Suggests: tinyca, mailx, mariadb-galera-test, netcat-openbsd, socat
|
||||
Recommends: libhtml-template-perl
|
||||
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
|
||||
Depends: mariadb-client-10.0 (>= ${source:Version}), libdbi-perl,
|
||||
perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc,
|
||||
passwd, lsb-base (>= 3.0-10), bsdutils,
|
||||
libmariadbclient18 (>= ${binary:Version}), galera-3 (>=25.3),
|
||||
rsync, lsof, grep, gawk, iproute, coreutils, findutils, tar
|
||||
Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5,
|
||||
mysql-server-core-10.0, mariadb-server, mysql-server,
|
||||
virtual-mysql-server, mariadb-galera-server
|
||||
Conflicts: mariadb-server, mysql-server, mariadb-galera-server (<< ${source:Version}),
|
||||
mysql-server-4.1, mysql-server-5.0,
|
||||
mariadb-server-5.1, mysql-server-5.1,
|
||||
mariadb-server-5.2,
|
||||
mariadb-server-5.3,
|
||||
mariadb-server-5.5, mysql-server-5.5,
|
||||
mysql-server-core-5.0,
|
||||
mariadb-server-core-5.1, mysql-server-core-5.1,
|
||||
mariadb-server-core-5.2,
|
||||
mariadb-server-core-5.5, mysql-server-core-5.5,
|
||||
mariadb-server-core-10.0,
|
||||
mariadb-tokudb-engine-5.5, mariadb-tokudb-engine-10.0
|
||||
Replaces: mariadb-server, mysql-server, mariadb-galera-server (<< ${source:Version}),
|
||||
mysql-server-4.1, mysql-server-5.0,
|
||||
mariadb-server-5.1, mysql-server-5.1,
|
||||
mariadb-server-5.2,
|
||||
mariadb-server-5.3,
|
||||
mariadb-server-5.5, mysql-server-5.5,
|
||||
libmariadbclient16 (<< 5.3.4), libmariadbclient-dev (<< 5.5.0),
|
||||
mysql-server-core-5.0,
|
||||
mariadb-server-core-5.1, mysql-server-core-5.1,
|
||||
mariadb-server-core-5.2,
|
||||
mariadb-server-core-5.5, mysql-server-core-5.5,
|
||||
mariadb-server-core-10.0,
|
||||
mariadb-tokudb-engine-5.5, mariadb-tokudb-engine-10.0
|
||||
Description: MariaDB database server with Galera cluster binaries
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
ease of use.
|
||||
.
|
||||
This package includes the server binaries.
|
||||
|
||||
Package: mariadb-galera-server
|
||||
Section: database
|
||||
Architecture: all
|
||||
Depends: mariadb-galera-server-10.0 (= ${source:Version}), ${misc:Depends}
|
||||
Description: MariaDB database server with Galera cluster (metapackage depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mariadb-galera-server (currently mariadb-galera-server-10.0), as determined by the MariaDB
|
||||
maintainers. Install this package if in doubt about which MariaDB-Galera
|
||||
version you need. That will install the version recommended by the
|
||||
package maintainers.
|
||||
.
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
ease of use.
|
||||
|
||||
Package: mariadb-client
|
||||
Section: database
|
||||
Architecture: all
|
||||
Depends: mariadb-client-10.0 (= ${source:Version}), ${misc:Depends}
|
||||
Description: MariaDB database client (metapackage depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mariadb-client (currently mariadb-client-10.0), as determined by the MariaDB
|
||||
maintainers. Install this package if in doubt about which MariaDB version
|
||||
you want, as this is the one we consider to be in the best shape.
|
||||
|
||||
Package: mariadb-galera-test
|
||||
Section: database
|
||||
Architecture: all
|
||||
Depends: mariadb-galera-test-10.0 (= ${source:Version})
|
||||
Description: MariaDB database regression test suite (metapackage depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mariadb-galera-test (currently mariadb-galera-test-10.0), as determined by the MariaDB
|
||||
maintainers.
|
118
debian/dist/Ubuntu/control
vendored
118
debian/dist/Ubuntu/control
vendored
@@ -1,118 +0,0 @@
|
||||
Source: mariadb-10.0
|
||||
Section: misc
|
||||
Priority: optional
|
||||
Maintainer: MariaDB Developers <maria-developers@lists.launchpad.net>
|
||||
XSBC-Original-Maintainer: Maria Developers <maria-developers@lists.launchpad.net>
|
||||
Uploaders: MariaDB Developers <maria-developers@lists.launchpad.net>
|
||||
Build-Depends: procps | hurd, debhelper, libncurses5-dev (>= 5.0-6),
|
||||
perl (>= 5.6.0), libwrap0-dev (>= 7.6-8.3),
|
||||
zlib1g-dev (>= 1:1.1.3-5), ${LIBREADLINE_DEV},
|
||||
libssl-dev, libpam0g-dev, psmisc, po-debconf, chrpath,
|
||||
dpatch, gawk, bison, lsb-release, hardening-wrapper,
|
||||
${CMAKE_DEP}libaio-dev, libjemalloc-dev (>= 3.0.0)
|
||||
Standards-Version: 3.8.2
|
||||
Homepage: http://mariadb.org/
|
||||
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/10.0/files
|
||||
Vcs-Bzr: bzr://lp:maria
|
||||
|
||||
Package: mariadb-galera-test-10.0
|
||||
Section: database
|
||||
Architecture: any
|
||||
Depends: mariadb-galera-server-10.0 (= ${source:Version}), mariadb-client-10.0 (>= ${source:Version})
|
||||
Suggests: patch
|
||||
Conflicts: mariadb-test, mariadb-galera-test (<< ${source:Version}),
|
||||
mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3,
|
||||
mariadb-test-5.5, mariadb-test-10.0,
|
||||
mariadb-server-5.5, mariadb-galera-server-5.5,
|
||||
mariadb-server-10.0
|
||||
Replaces: mariadb-test (<< ${source:Version}), mariadb-galera-test (<< ${source:Version}),
|
||||
mariadb-test-5.1, mariadb-test-5.2, mariadb-test-5.3,
|
||||
mariadb-test-5.5
|
||||
Description: MariaDB database regression test suite
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
ease of use.
|
||||
.
|
||||
This package includes the regression test suite.
|
||||
|
||||
Package: mariadb-galera-server-10.0
|
||||
Architecture: any
|
||||
Suggests: tinyca, mailx, mariadb-galera-test, netcat-openbsd, socat
|
||||
Recommends: libhtml-template-perl
|
||||
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
|
||||
Depends: mariadb-client-10.0 (>= ${source:Version}), libdbi-perl,
|
||||
perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc,
|
||||
passwd, lsb-base (>= 3.0-10), bsdutils,
|
||||
libmariadbclient18 (>= ${binary:Version}), galera-3 (>=25.3),
|
||||
rsync, lsof, grep, gawk, iproute, coreutils, findutils, tar
|
||||
Provides: mysql-server-core, mysql-server-core-5.1, mysql-server-core-5.5,
|
||||
mysql-server-core-10.0, mariadb-server, mysql-server,
|
||||
virtual-mysql-server, mariadb-galera-server
|
||||
Conflicts: mariadb-server, mysql-server, mariadb-galera-server (<< ${source:Version}),
|
||||
mysql-server-4.1, mysql-server-5.0,
|
||||
mariadb-server-5.1, mysql-server-5.1,
|
||||
mariadb-server-5.2,
|
||||
mariadb-server-5.3,
|
||||
mariadb-server-5.5, mysql-server-5.5,
|
||||
mysql-server-core-5.0,
|
||||
mariadb-server-core-5.1, mysql-server-core-5.1,
|
||||
mariadb-server-core-5.2,
|
||||
mariadb-server-core-5.5, mysql-server-core-5.5,
|
||||
mariadb-server-core-10.0,
|
||||
mariadb-tokudb-engine-5.5, mariadb-tokudb-engine-10.0
|
||||
Replaces: mariadb-server, mysql-server, mariadb-galera-server (<< ${source:Version}),
|
||||
mysql-server-4.1, mysql-server-5.0,
|
||||
mariadb-server-5.1, mysql-server-5.1,
|
||||
mariadb-server-5.2,
|
||||
mariadb-server-5.3,
|
||||
mariadb-server-5.5, mysql-server-5.5,
|
||||
libmariadbclient16 (<< 5.3.4), libmariadbclient-dev (<< 5.5.0),
|
||||
mysql-server-core-5.0,
|
||||
mariadb-server-core-5.1, mysql-server-core-5.1,
|
||||
mariadb-server-core-5.2,
|
||||
mariadb-server-core-5.5, mysql-server-core-5.5,
|
||||
mariadb-server-core-10.0,
|
||||
mariadb-tokudb-engine-5.5, mariadb-tokudb-engine-10.0
|
||||
Description: MariaDB database server with Galera cluster binaries
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
ease of use.
|
||||
.
|
||||
This package includes the server binaries.
|
||||
|
||||
Package: mariadb-galera-server
|
||||
Section: database
|
||||
Architecture: all
|
||||
Depends: mariadb-galera-server-10.0 (= ${source:Version}), ${misc:Depends}
|
||||
Description: MariaDB database server with Galera cluster (metapackage depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mariadb-galera-server (currently mariadb-galera-server-10.0), as determined by the MariaDB
|
||||
maintainers. Install this package if in doubt about which MariaDB-Galera
|
||||
version you need. That will install the version recommended by the
|
||||
package maintainers.
|
||||
.
|
||||
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
|
||||
server. SQL (Structured Query Language) is the most popular database query
|
||||
language in the world. The main goals of MariaDB are speed, robustness and
|
||||
ease of use.
|
||||
|
||||
Package: mariadb-client
|
||||
Section: database
|
||||
Architecture: all
|
||||
Depends: mariadb-client-10.0 (= ${source:Version}), ${misc:Depends}
|
||||
Description: MariaDB database client (metapackage depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mariadb-client (currently mariadb-client-10.0), as determined by the MariaDB
|
||||
maintainers. Install this package if in doubt about which MariaDB version
|
||||
you want, as this is the one we consider to be in the best shape.
|
||||
|
||||
Package: mariadb-galera-test
|
||||
Section: database
|
||||
Architecture: all
|
||||
Depends: mariadb-galera-test-10.0 (= ${source:Version})
|
||||
Description: MariaDB database regression test suite (metapackage depending on the latest version)
|
||||
This is an empty package that depends on the current "best" version of
|
||||
mariadb-galera-test (currently mariadb-galera-test-10.0), as determined by the MariaDB
|
||||
maintainers.
|
@@ -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/mysql-slow.log {
|
||||
/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mariadb-slow.log {
|
||||
daily
|
||||
rotate 7
|
||||
missingok
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates.
|
||||
|
||||
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
|
||||
@@ -235,7 +235,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
FILE* f; /* our input file */
|
||||
char* filename; /* our input filename. */
|
||||
unsigned char *big_buf, *buf;
|
||||
unsigned char *big_buf= 0, *buf;
|
||||
|
||||
ulong bytes; /* bytes read count */
|
||||
ulint ct; /* current page number (0 based) */
|
||||
@@ -266,14 +266,14 @@ int main(int argc, char **argv)
|
||||
if (*filename == '\0')
|
||||
{
|
||||
fprintf(stderr, "Error; File name missing\n");
|
||||
return 1;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* stat the file to get size and page count */
|
||||
if (stat(filename, &st))
|
||||
{
|
||||
fprintf(stderr, "Error; %s cannot be found\n", filename);
|
||||
return 1;
|
||||
goto error;
|
||||
}
|
||||
size= st.st_size;
|
||||
|
||||
@@ -283,7 +283,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
fprintf(stderr, "Error; %s cannot be opened", filename);
|
||||
perror(" ");
|
||||
return 1;
|
||||
goto error;
|
||||
}
|
||||
|
||||
big_buf = (unsigned char *)malloc(2 * UNIV_PAGE_SIZE_MAX);
|
||||
@@ -291,7 +291,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
fprintf(stderr, "Error; failed to allocate memory\n");
|
||||
perror("");
|
||||
return 1;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* Make sure the page is aligned */
|
||||
@@ -299,10 +299,7 @@ int main(int argc, char **argv)
|
||||
+ UNIV_PAGE_SIZE_MAX, UNIV_PAGE_SIZE_MAX);
|
||||
|
||||
if (!get_page_size(f, buf, &logical_page_size, &physical_page_size))
|
||||
{
|
||||
free(big_buf);
|
||||
return 1;
|
||||
}
|
||||
goto error;
|
||||
|
||||
if (compressed)
|
||||
{
|
||||
@@ -322,8 +319,7 @@ int main(int argc, char **argv)
|
||||
if (verbose)
|
||||
printf("Number of pages: ");
|
||||
printf("%lu\n", pages);
|
||||
free(big_buf);
|
||||
return 0;
|
||||
goto ok;
|
||||
}
|
||||
else if (verbose)
|
||||
{
|
||||
@@ -349,8 +345,7 @@ int main(int argc, char **argv)
|
||||
if (!fd)
|
||||
{
|
||||
perror("Error; Unable to obtain file descriptor number");
|
||||
free(big_buf);
|
||||
return 1;
|
||||
goto error;
|
||||
}
|
||||
|
||||
offset= (off_t)start_page * (off_t)physical_page_size;
|
||||
@@ -358,8 +353,7 @@ int main(int argc, char **argv)
|
||||
if (lseek(fd, offset, SEEK_SET) != offset)
|
||||
{
|
||||
perror("Error; Unable to seek to necessary offset");
|
||||
free(big_buf);
|
||||
return 1;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,17 +364,13 @@ int main(int argc, char **argv)
|
||||
{
|
||||
bytes= fread(buf, 1, physical_page_size, f);
|
||||
if (!bytes && feof(f))
|
||||
{
|
||||
free(big_buf);
|
||||
return 0;
|
||||
}
|
||||
goto ok;
|
||||
|
||||
if (ferror(f))
|
||||
{
|
||||
fprintf(stderr, "Error reading %lu bytes", physical_page_size);
|
||||
perror(" ");
|
||||
free(big_buf);
|
||||
return 1;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (compressed) {
|
||||
@@ -388,10 +378,7 @@ int main(int argc, char **argv)
|
||||
if (!page_zip_verify_checksum(buf, physical_page_size)) {
|
||||
fprintf(stderr, "Fail; page %lu invalid (fails compressed page checksum).\n", ct);
|
||||
if (!skip_corrupt)
|
||||
{
|
||||
free(big_buf);
|
||||
return 1;
|
||||
}
|
||||
goto error;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -404,10 +391,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
fprintf(stderr, "Fail; page %lu invalid (fails log sequence number check)\n", ct);
|
||||
if (!skip_corrupt)
|
||||
{
|
||||
free(big_buf);
|
||||
return 1;
|
||||
}
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* check old method of checksumming */
|
||||
@@ -419,10 +403,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
fprintf(stderr, "Fail; page %lu invalid (fails old style checksum)\n", ct);
|
||||
if (!skip_corrupt)
|
||||
{
|
||||
free(big_buf);
|
||||
return 1;
|
||||
}
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* now check the new method */
|
||||
@@ -436,18 +417,12 @@ int main(int argc, char **argv)
|
||||
{
|
||||
fprintf(stderr, "Fail; page %lu invalid (fails innodb and crc32 checksum)\n", ct);
|
||||
if (!skip_corrupt)
|
||||
{
|
||||
free(big_buf);
|
||||
return 1;
|
||||
}
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
/* end if this was the last page we were supposed to check */
|
||||
if (use_end_page && (ct >= end_page))
|
||||
{
|
||||
free(big_buf);
|
||||
return 0;
|
||||
}
|
||||
goto ok;
|
||||
|
||||
/* do counter increase and progress printing */
|
||||
ct++;
|
||||
@@ -465,6 +440,14 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ok:
|
||||
free(big_buf);
|
||||
return 0;
|
||||
my_end(0);
|
||||
exit(0);
|
||||
|
||||
error:
|
||||
free(big_buf);
|
||||
my_end(0);
|
||||
exit(1);
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ extern "C" {
|
||||
|
||||
typedef uint my_hash_value_type;
|
||||
typedef uchar *(*my_hash_get_key)(const uchar *,size_t*,my_bool);
|
||||
typedef my_hash_value_type (*my_hash_function)(const CHARSET_INFO *,
|
||||
typedef my_hash_value_type (*my_hash_function)(CHARSET_INFO *,
|
||||
const uchar *, size_t);
|
||||
typedef void (*my_hash_free_key)(void *);
|
||||
typedef my_bool (*my_hash_walk_action)(void *,void *);
|
||||
@@ -78,7 +78,7 @@ uchar *my_hash_search(const HASH *info, const uchar *key, size_t length);
|
||||
uchar *my_hash_search_using_hash_value(const HASH *info,
|
||||
my_hash_value_type hash_value,
|
||||
const uchar *key, size_t length);
|
||||
my_hash_value_type my_hash_sort(const CHARSET_INFO *cs,
|
||||
my_hash_value_type my_hash_sort(CHARSET_INFO *cs,
|
||||
const uchar *key, size_t length);
|
||||
#define my_calc_hash(A, B, C) my_hash_sort((A)->charset, B, C)
|
||||
uchar *my_hash_first(const HASH *info, const uchar *key, size_t length,
|
||||
|
@@ -555,7 +555,11 @@ typedef int my_socket; /* File descriptor for sockets */
|
||||
/* Type for fuctions that handles signals */
|
||||
#define sig_handler RETSIGTYPE
|
||||
C_MODE_START
|
||||
#ifdef HAVE_SIGHANDLER_T
|
||||
#define sig_return sighandler_t
|
||||
#else
|
||||
typedef void (*sig_return)(void); /* Returns type from signal */
|
||||
#endif
|
||||
C_MODE_END
|
||||
#if defined(__GNUC__) && !defined(_lint)
|
||||
typedef char pchar; /* Mixed prototypes can take char */
|
||||
|
@@ -86,10 +86,12 @@ typedef volatile LONG my_pthread_once_t;
|
||||
#define MY_PTHREAD_ONCE_INPROGRESS 1
|
||||
#define MY_PTHREAD_ONCE_DONE 2
|
||||
|
||||
#if !STRUCT_TIMESPEC_HAS_TV_SEC || !STRUCT_TIMESPEC_HAS_TV_NSEC
|
||||
struct timespec {
|
||||
time_t tv_sec;
|
||||
long tv_nsec;
|
||||
};
|
||||
#endif
|
||||
|
||||
int win_pthread_mutex_trylock(pthread_mutex_t *mutex);
|
||||
int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *);
|
||||
|
@@ -259,8 +259,7 @@ extern myf my_global_flags; /* Set to MY_WME for more error messages
|
||||
/* Point to current my_message() */
|
||||
extern void (*my_sigtstp_cleanup)(void),
|
||||
/* Executed before jump to shell */
|
||||
(*my_sigtstp_restart)(void),
|
||||
(*my_abort_hook)(int);
|
||||
(*my_sigtstp_restart)(void);
|
||||
/* Executed when comming from shell */
|
||||
extern MYSQL_PLUGIN_IMPORT int my_umask; /* Default creation mask */
|
||||
extern int my_umask_dir,
|
||||
|
@@ -149,7 +149,7 @@ MYSQL_SOCKET socket __attribute__ ((unused))
|
||||
/**
|
||||
MYSQL_SOCKET helper. Get socket descriptor.
|
||||
@param mysql_socket Instrumented socket
|
||||
@sa mysql_socket_setfd
|
||||
@sa mysql_socket_getfd
|
||||
*/
|
||||
static inline my_socket
|
||||
mysql_socket_getfd(MYSQL_SOCKET mysql_socket)
|
||||
@@ -161,7 +161,7 @@ mysql_socket_getfd(MYSQL_SOCKET mysql_socket)
|
||||
MYSQL_SOCKET helper. Set socket descriptor.
|
||||
@param mysql_socket Instrumented socket
|
||||
@param fd Socket descriptor
|
||||
@sa mysql_socket_getfd
|
||||
@sa mysql_socket_setfd
|
||||
*/
|
||||
static inline void
|
||||
mysql_socket_setfd(MYSQL_SOCKET *mysql_socket, my_socket fd)
|
||||
|
@@ -1009,6 +1009,8 @@ struct PSI_statement_locker_state_v1
|
||||
char m_schema_name[PSI_SCHEMA_NAME_LEN];
|
||||
/** Length in bytes of @c m_schema_name. */
|
||||
uint m_schema_name_length;
|
||||
/** Statement character set number. */
|
||||
uint m_cs_number;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -268,6 +268,7 @@ struct PSI_statement_locker_state_v1
|
||||
const struct sql_digest_storage *m_digest;
|
||||
char m_schema_name[(64 * 3)];
|
||||
uint m_schema_name_length;
|
||||
uint m_cs_number;
|
||||
};
|
||||
struct PSI_socket_locker_state_v1
|
||||
{
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
/* Copyright (c) 2000, 2015, 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);
|
||||
snprintf(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);
|
||||
|
@@ -90,7 +90,7 @@ const char *client_errors[]=
|
||||
""
|
||||
};
|
||||
|
||||
const char** get_client_errmsgs()
|
||||
const char** get_client_errmsgs(void)
|
||||
{
|
||||
return client_errors;
|
||||
}
|
||||
|
@@ -1275,7 +1275,7 @@ to point the slave to the correct master server host\&. Add any such parameters
|
||||
.\" max-allowed-packet option: mysqldump
|
||||
\fB\-\-max\-allowed\-packet=\fR\fB\fIlength\fR\fR
|
||||
.sp
|
||||
Sets the maximum packet length to send to or recieve from server\&.
|
||||
Sets the maximum packet length to send to or receive from server\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
|
@@ -52,7 +52,7 @@ eval SELECT 'hello' INTO OUTFILE 'fake_file.$prefix';
|
||||
|
||||
# Use '/' instead of '\' in the error message. On windows platform, dir is
|
||||
# formed with '\'.
|
||||
--replace_regex /\\testing_1\\*/\/testing_1\// /66/39/
|
||||
--replace_regex /\\testing_1\\*/\/testing_1\// /66/39/ /17/39/ /File exists/Directory not empty/
|
||||
--error 1010
|
||||
DROP DATABASE testing_1;
|
||||
let $wait_binlog_event= DROP TABLE IF EXIST;
|
||||
|
@@ -62,24 +62,3 @@ UPDATE t1 SET c1= 0;
|
||||
DROP TABLE t1;
|
||||
-- sync_slave_with_master
|
||||
|
||||
#
|
||||
# BUG#11766865: 60091: RBR + NO PK + UPDATE NULL VALUE --> SLAVE BREAK WITH ERROR HA_ERR_END_OF_
|
||||
#
|
||||
|
||||
--connection master
|
||||
--source include/rpl_reset.inc
|
||||
--connection master
|
||||
|
||||
--eval CREATE TABLE t1 (c1 int(11) NOT NULL, c2 int(11) NOT NULL, c3 int(11) DEFAULT '-1') ENGINE=$engine DEFAULT CHARSET=latin1
|
||||
|
||||
INSERT INTO t1 VALUES (1,2,NULL);
|
||||
UPDATE t1 SET c1=1, c2=2, c3=-1 WHERE c1=1 AND c2=2 AND ISNULL(c3);
|
||||
|
||||
--sync_slave_with_master
|
||||
|
||||
--let $diff_tables=master:test.t1, slave:test.t1
|
||||
--source include/diff_tables.inc
|
||||
|
||||
--connection master
|
||||
DROP TABLE t1;
|
||||
--sync_slave_with_master
|
||||
|
@@ -440,7 +440,7 @@ INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
|
||||
connection slave;
|
||||
# 1677 = ER_SLAVE_CONVERSION_FAILED
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
|
||||
@@ -453,7 +453,7 @@ INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
|
||||
connection slave;
|
||||
# 1677 = ER_SLAVE_CONVERSION_FAILED
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $slave_sql_errno= 1677
|
||||
--let $show_slave_sql_error= 1
|
||||
--source include/wait_for_slave_sql_error.inc
|
||||
|
||||
|
@@ -15,7 +15,8 @@ eval CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=$engine_type;
|
||||
INSERT INTO t1 SET name='Andy', age=31;
|
||||
INSERT INTO t1 SET name='Jacob', age=2;
|
||||
INSERT INTO t1 SET name='Caleb', age=1;
|
||||
ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY;
|
||||
ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY,
|
||||
ALGORITHM=COPY;
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
|
@@ -28,7 +28,7 @@
|
||||
if ($_param_value != $slave_param_value) {
|
||||
--source include/show_rpl_debug_info.inc
|
||||
--echo Wrong value for $slave_param. Expected '$slave_param_value', got '$_param_value'
|
||||
--die Wrong value for slave parameter
|
||||
--die Wrong value for slave parameter $slave_param
|
||||
}
|
||||
|
||||
|
||||
|
@@ -31,7 +31,6 @@ debug-no-sync
|
||||
|
||||
# Retry bind as this may fail on busy server
|
||||
port-open-timeout=10
|
||||
bind-address=127.0.0.1
|
||||
|
||||
log-bin-trust-function-creators=1
|
||||
key_buffer_size= 1M
|
||||
@@ -40,6 +39,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:12M:autoextend
|
||||
loose-innodb_buffer_pool_size= 8M
|
||||
|
@@ -10,7 +10,8 @@ if ($binlog_file)
|
||||
{
|
||||
--let $_in_binlog_file=in '$binlog_file'
|
||||
}
|
||||
--replace_result $_binlog_start <binlog_start> $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--let $_from_binlog_start=from $_binlog_start
|
||||
--replace_result "$_from_binlog_start" "from <binlog_start>" $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/
|
||||
--eval show binlog events $_in_binlog_file from $_binlog_start
|
||||
|
@@ -169,6 +169,13 @@ sub fix_log {
|
||||
return "$dir/mysqld.log";
|
||||
}
|
||||
|
||||
sub fix_bind_address {
|
||||
if (IS_WINDOWS) {
|
||||
return "*";
|
||||
} else {
|
||||
return "127.0.0.1";
|
||||
}
|
||||
}
|
||||
sub fix_log_slow_queries {
|
||||
my ($self, $config, $group_name, $group)= @_;
|
||||
my $dir= dirname($group->value('datadir'));
|
||||
@@ -251,6 +258,7 @@ my @mysqld_rules=
|
||||
{ 'ssl-ca' => \&fix_ssl_ca },
|
||||
{ 'ssl-cert' => \&fix_ssl_server_cert },
|
||||
{ 'ssl-key' => \&fix_ssl_server_key },
|
||||
{ 'bind-address' => \&fix_bind_address },
|
||||
);
|
||||
|
||||
if (IS_WINDOWS)
|
||||
@@ -325,6 +333,7 @@ my @cluster_config_rules=
|
||||
#
|
||||
my @client_rules=
|
||||
(
|
||||
{ 'character-sets-dir' => \&fix_charset_dir },
|
||||
);
|
||||
|
||||
|
||||
@@ -347,7 +356,6 @@ my @mysqltest_rules=
|
||||
#
|
||||
my @mysqlbinlog_rules=
|
||||
(
|
||||
{ 'character-sets-dir' => \&fix_charset_dir },
|
||||
);
|
||||
|
||||
|
||||
|
@@ -842,7 +842,7 @@ sub run_test_server ($$$) {
|
||||
redo;
|
||||
}
|
||||
|
||||
# Limit number of parallell NDB tests
|
||||
# Limit number of parallel NDB tests
|
||||
if ($t->{ndb_test} and $num_ndb_tests >= $max_ndb){
|
||||
#mtr_report("Skipping, num ndb is already at max, $num_ndb_tests");
|
||||
next;
|
||||
@@ -6417,10 +6417,10 @@ Options to control what engine/variation to run:
|
||||
non-blocking-api Use the non-blocking client API
|
||||
compress Use the compressed protocol between client and server
|
||||
ssl Use ssl protocol between client and server
|
||||
skip-ssl Dont start server with support for ssl connections
|
||||
skip-ssl Don't start server with support for ssl connections
|
||||
vs-config Visual Studio configuration used to create executables
|
||||
(default: MTR_VS_CONFIG environment variable)
|
||||
parallel=# How many parallell test should be run
|
||||
parallel=# How many parallel test should be run
|
||||
defaults-file=<config template> Use fixed config template for all
|
||||
tests
|
||||
defaults-extra-file=<config template> Extra config template to add to
|
||||
@@ -6551,7 +6551,7 @@ Options for debugging the product
|
||||
up disks for heavily crashing server). Defaults to
|
||||
$opt_max_save_datadir, set to 0 for no limit. Set
|
||||
it's default with MTR_MAX_SAVE_DATADIR
|
||||
max-test-fail Limit the number of test failurs before aborting
|
||||
max-test-fail Limit the number of test failures before aborting
|
||||
the current test run. Defaults to
|
||||
$opt_max_test_fail, set to 0 for no limit. Set
|
||||
it's default with MTR_MAX_TEST_FAIL
|
||||
@@ -6598,7 +6598,7 @@ Misc options
|
||||
--mysqld (if any)
|
||||
wait-all If --start or --start-dirty option is used, wait for all
|
||||
servers to exit before finishing the process
|
||||
fast Run as fast as possible, dont't wait for servers
|
||||
fast Run as fast as possible, don't wait for servers
|
||||
to shutdown etc.
|
||||
force-restart Always restart servers between tests
|
||||
parallel=N Run tests in N parallel threads (default 1)
|
||||
@@ -6633,7 +6633,7 @@ Misc options
|
||||
actions. Disable facility with NUM=0.
|
||||
gcov Collect coverage information after the test.
|
||||
The result is a gcov file per source and header file.
|
||||
gcov-src-dir=subdir Colllect coverage only within the given subdirectory.
|
||||
gcov-src-dir=subdir Collect coverage only within the given subdirectory.
|
||||
For example, if you're only developing the SQL layer,
|
||||
it makes sense to use --gcov-src-dir=sql
|
||||
gprof Collect profiling information using gprof.
|
||||
|
@@ -2656,5 +2656,11 @@ 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;
|
||||
create table t1;
|
||||
ERROR 42000: A table must have at least 1 column
|
||||
|
@@ -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
|
||||
|
@@ -6055,6 +6055,33 @@ 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
|
||||
#
|
||||
#
|
||||
|
@@ -6,16 +6,16 @@ hex(COLUMN_CREATE(1, NULL AS char character set utf8))
|
||||
000000
|
||||
select hex(COLUMN_CREATE(1, "afaf" AS char character set utf8));
|
||||
hex(COLUMN_CREATE(1, "afaf" AS char character set utf8))
|
||||
0001000100030861666166
|
||||
0001000100032161666166
|
||||
select hex(COLUMN_CREATE(1, 1212 AS char character set utf8));
|
||||
hex(COLUMN_CREATE(1, 1212 AS char character set utf8))
|
||||
0001000100030831323132
|
||||
0001000100032131323132
|
||||
select hex(COLUMN_CREATE(1, 12.12 AS char character set utf8));
|
||||
hex(COLUMN_CREATE(1, 12.12 AS char character set utf8))
|
||||
0001000100030831322E3132
|
||||
0001000100032131322E3132
|
||||
select hex(COLUMN_CREATE(1, 99999999999999999999999999999 AS char character set utf8));
|
||||
hex(COLUMN_CREATE(1, 99999999999999999999999999999 AS char character set utf8))
|
||||
000100010003083939393939393939393939393939393939393939393939393939393939
|
||||
000100010003213939393939393939393939393939393939393939393939393939393939
|
||||
select hex(COLUMN_CREATE(1, NULL AS unsigned int));
|
||||
hex(COLUMN_CREATE(1, NULL AS unsigned int))
|
||||
000000
|
||||
@@ -144,7 +144,7 @@ hex(COLUMN_CREATE(1, "afaf" AS char character set utf8,
|
||||
6, "2011-04-05" AS date,
|
||||
7, "- 0:45:49.000001" AS time,
|
||||
8, "2011-04-05 0:45:49.000001" AS datetime))
|
||||
01080001000300020029000300380004004A0005008C000600AE000700C7000800F5000861666166BC0478093D0AD7A3703D284002028C0C85B60F010010B7000485B60F010010B70000
|
||||
01080001000300020029000300380004004A0005008C000600AE000700C7000800F5002161666166BC0478093D0AD7A3703D284002028C0C85B60F010010B7000485B60F010010B70000
|
||||
explain extended
|
||||
select hex(COLUMN_CREATE(1, "afaf" AS char character set utf8,
|
||||
2, 1212 AS unsigned int,
|
||||
@@ -1693,10 +1693,10 @@ ERROR 22007: Illegal value used as argument of dynamic column function
|
||||
#
|
||||
select column_json(column_create("int", -1212 as int, "uint", 12334 as unsigned int, "decimal", "23.344" as decimal, "double", 1.23444e50 as double, "string", 'gdgd\\dhdjh"dhdhd' as char, "time", "0:45:49.000001" AS time, "datetime", "2011-04-05 0:45:49.000001" AS datetime, "date", "2011-04-05" AS date));
|
||||
column_json(column_create("int", -1212 as int, "uint", 12334 as unsigned int, "decimal", "23.344" as decimal, "double", 1.23444e50 as double, "string", 'gdgd\\dhdjh"dhdhd' as char, "time", "0:45:49.000001" AS time, "datetime", "2011-04-05 0:45:49.000001"
|
||||
{"int":-1212,"date":"2011-04-05","time":"00:45:49.000001","uint":12334,"double":"1.2e50","string":"gdgd\\dhdjh\"dhdhd","decimal":23.344,"datetime":"2011-04-05 00:45:49.000001"}
|
||||
{"int":-1212,"date":"2011-04-05","time":"00:45:49.000001","uint":12334,"double":1.23444e50,"string":"gdgd\\dhdjh\"dhdhd","decimal":23.344,"datetime":"2011-04-05 00:45:49.000001"}
|
||||
select column_json(column_create(1, -1212 as int, 2, 12334 as unsigned int, 3, "23.344" as decimal, 4, 1.23444e50 as double, 5, 'gdgd\\dhdjh"dhdhd' as char, 6, "0:45:49.000001" AS time, 7, "2011-04-05 0:45:49.000001" AS datetime, 8, "2011-04-05" AS date));
|
||||
column_json(column_create(1, -1212 as int, 2, 12334 as unsigned int, 3, "23.344" as decimal, 4, 1.23444e50 as double, 5, 'gdgd\\dhdjh"dhdhd' as char, 6, "0:45:49.000001" AS time, 7, "2011-04-05 0:45:49.000001" AS datetime, 8, "2011-04-05" AS date))
|
||||
{"1":-1212,"2":12334,"3":23.344,"4":"1.2e50","5":"gdgd\\dhdjh\"dhdhd","6":"00:45:49.000001","7":"2011-04-05 00:45:49.000001","8":"2011-04-05"}
|
||||
{"1":-1212,"2":12334,"3":23.344,"4":1.23444e50,"5":"gdgd\\dhdjh\"dhdhd","6":"00:45:49.000001","7":"2011-04-05 00:45:49.000001","8":"2011-04-05"}
|
||||
#
|
||||
# CHECK test
|
||||
#
|
||||
@@ -1820,5 +1820,58 @@ SELECT COLUMN_JSON(COLUMN_CREATE('a',1,'b','1'));
|
||||
COLUMN_JSON(COLUMN_CREATE('a',1,'b','1'))
|
||||
{"a":1,"b":"1"}
|
||||
#
|
||||
# MDEV-8401: COLUMN_CREATE(name, value as DOUBLE) results in string
|
||||
#
|
||||
SELECT COLUMN_JSON(
|
||||
COLUMN_CREATE(
|
||||
'one', 123.456,
|
||||
'two', 123.456 as DOUBLE
|
||||
)
|
||||
);
|
||||
COLUMN_JSON(
|
||||
COLUMN_CREATE(
|
||||
'one', 123.456,
|
||||
'two', 123.456 as DOUBLE
|
||||
)
|
||||
)
|
||||
{"one":123.456,"two":123.456}
|
||||
#
|
||||
# MDEV-8521: Drastic loss of precision in COLUMN_JSON() on DOUBLEs
|
||||
#
|
||||
select column_get(column_create('float', 1.23456789012345E+100 as double), 'float' as double);
|
||||
column_get(column_create('float', 1.23456789012345E+100 as double), 'float' as double)
|
||||
1.23456789012345e100
|
||||
select column_json(column_create('float', 1.23456789012345E+100 as double));
|
||||
column_json(column_create('float', 1.23456789012345E+100 as double))
|
||||
{"float":1.23456789012345e100}
|
||||
select column_json(column_create('float', 1.23456789012345E+10 as double));
|
||||
column_json(column_create('float', 1.23456789012345E+10 as double))
|
||||
{"float":12345678901.2345}
|
||||
#
|
||||
# MDEV-9147: Character set is ignored in Dynamic Column for saved string
|
||||
#
|
||||
SET NAMES utf8;
|
||||
SELECT COLUMN_GET(COLUMN_CREATE(1, 0xC2A2 AS CHAR CHARACTER SET latin1), 1 AS CHAR CHARACTER SET utf8) AS a;
|
||||
a
|
||||
¢
|
||||
SELECT COLUMN_GET(COLUMN_CREATE(1, 0xC2A2 AS CHAR CHARACTER SET utf8), 1 AS CHAR CHARACTER SET utf8) AS a;
|
||||
a
|
||||
¢
|
||||
#
|
||||
# MDEV-9167: COLUMN_CHECK fails on valid decimal data
|
||||
#
|
||||
SELECT COLUMN_CHECK(COLUMN_CREATE('a',0 AS DECIMAL,'b',1 AS DECIMAL));
|
||||
COLUMN_CHECK(COLUMN_CREATE('a',0 AS DECIMAL,'b',1 AS DECIMAL))
|
||||
1
|
||||
SELECT COLUMN_CHECK(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL));
|
||||
COLUMN_CHECK(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL))
|
||||
1
|
||||
SELECT COLUMN_JSON(COLUMN_CREATE('a',0 AS DECIMAL,'b',1 AS DECIMAL));
|
||||
COLUMN_JSON(COLUMN_CREATE('a',0 AS DECIMAL,'b',1 AS DECIMAL))
|
||||
{"a":0,"b":1}
|
||||
SELECT COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL));
|
||||
COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL))
|
||||
{"a":1,"b":1}
|
||||
#
|
||||
# end of 10.0 tests
|
||||
#
|
||||
|
@@ -114,8 +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("20251010", 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
|
||||
|
@@ -393,3 +393,17 @@ Warnings:
|
||||
Note 1003 select NULL AS `a` from (select NULL AS `a` from `test`.`t1` where 0) `t`
|
||||
set optimizer_switch=@tmp_optimizer_switch;
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# MDEV-7215: EXPLAIN REPLACE produces an error:
|
||||
# Column count doesn't match value count
|
||||
#
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1);
|
||||
create table t2 (b int, c int);
|
||||
replace into t2 select 100, (select a from t1);
|
||||
explain replace into t2 select 100, (select a from t1);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
2 SUBQUERY t1 system NULL NULL NULL NULL 1
|
||||
drop table t1, t2;
|
||||
# End of 10.1 tests
|
||||
|
@@ -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');
|
||||
|
@@ -63,3 +63,8 @@ CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a= 1;
|
||||
RENAME TABLE t1 TO T1;
|
||||
ALTER TABLE T1 RENAME t1;
|
||||
DROP TABLE t1;
|
||||
create table t1 (a int);
|
||||
create trigger t1_bi before insert on t1 for each row set new.a= 1;
|
||||
show triggers like '%T1%';
|
||||
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
|
||||
drop table t1;
|
||||
|
@@ -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.
|
||||
|
||||
|
@@ -45,7 +45,7 @@ Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||
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 whether it has been run before
|
||||
Phase 1/6: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
@@ -393,6 +393,13 @@ test
|
||||
Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||
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
|
||||
#
|
||||
|
@@ -5317,3 +5317,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`;
|
||||
|
@@ -2100,6 +2100,19 @@ count(*)
|
||||
40960
|
||||
drop table t1;
|
||||
set names default;
|
||||
create table t2 (a int, b int, c int, d int, key x(a, b));
|
||||
insert into t2 values (2, 2, 2, 2), (3, 3, 3, 3), (4, 4, 4, 4), (5, 5, 5, 5),
|
||||
(6, 6, 6, 6), (7, 7, 7, 7), (8, 8, 8, 8), (9, 9, 9, 9);
|
||||
insert into t2 select * from t2;
|
||||
insert into t2 values (0, 0, 0, 0), (1, 1, 1, 1);
|
||||
analyze table t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 analyze status OK
|
||||
select a, b from t2 where (a, b) in ((0, 0), (1, 1));
|
||||
a b
|
||||
0 0
|
||||
1 1
|
||||
drop table t2;
|
||||
#
|
||||
# BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE
|
||||
#
|
||||
|
@@ -2102,6 +2102,19 @@ count(*)
|
||||
40960
|
||||
drop table t1;
|
||||
set names default;
|
||||
create table t2 (a int, b int, c int, d int, key x(a, b));
|
||||
insert into t2 values (2, 2, 2, 2), (3, 3, 3, 3), (4, 4, 4, 4), (5, 5, 5, 5),
|
||||
(6, 6, 6, 6), (7, 7, 7, 7), (8, 8, 8, 8), (9, 9, 9, 9);
|
||||
insert into t2 select * from t2;
|
||||
insert into t2 values (0, 0, 0, 0), (1, 1, 1, 1);
|
||||
analyze table t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 analyze status OK
|
||||
select a, b from t2 where (a, b) in ((0, 0), (1, 1));
|
||||
a b
|
||||
0 0
|
||||
1 1
|
||||
drop table t2;
|
||||
#
|
||||
# BUG#13731380: RANGE OPTIMIZER CALLS RECORDS_IN_RANGE() FOR OPEN RANGE
|
||||
#
|
||||
|
80
mysql-test/r/show_row_order-9226.result
Normal file
80
mysql-test/r/show_row_order-9226.result
Normal file
@@ -0,0 +1,80 @@
|
||||
create table test_table (
|
||||
column_number_1 enum('1','2') not null,
|
||||
column_number_2 enum('1','2','3','4','5','6','7','8','9','10','11','12') not null,
|
||||
column_number_3 varchar(10) not null,
|
||||
column_number_4 varchar(10) not null,
|
||||
column_number_5 enum(
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa01',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa02',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa03',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa04',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa05',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa06',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa07',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa08',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa09',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa10',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa11',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa13',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa14',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa15',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa16',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa17',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa18',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa19',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa20',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa21',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa22',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa23',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa24',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa25',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa26',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa27',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa28',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa29',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa30',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa31',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa32',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa33',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa34',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa35',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa36',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa37',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa38',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa39',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa40',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa41',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa42',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa43',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa44',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa45',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa46',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa47',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa48',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa49',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa50',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa51',
|
||||
'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa52'
|
||||
) not null,
|
||||
column_number_6 enum('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','65','66','67','68','69','70','71','72','73','74','75','76','77','78','79','80','81','82','83','84','85','86','87','88','89','90','91','92','93','94','95','96','97','98','99','100','101','102','103','104','105','106','107','108','109','110','111','112','113','114','115','116','117','118','119','120','121','122','123','124','125','126','127','128','129','130','131') not null,
|
||||
column_number_7 enum('1','2','3','4','5','6','7') not null,
|
||||
column_number_8 enum('8') not null,
|
||||
column_number_9 enum('9') not null,
|
||||
column_number_10 varchar(10) not null,
|
||||
column_number_11 enum('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49') not null
|
||||
) default charset=utf8mb4;
|
||||
show columns from test_table;
|
||||
Field Type Null Key Default Extra
|
||||
column_number_1 enum('1','2') NO NULL
|
||||
column_number_2 enum('1','2','3','4','5','6','7','8','9','10','11','12') NO NULL
|
||||
column_number_3 varchar(10) NO NULL
|
||||
column_number_4 varchar(10) NO NULL
|
||||
column_number_5 enum('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa01','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa02','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa03','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa04','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa05','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa06','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa07','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa08','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa09','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa10','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa11','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa13','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa14','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa15','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa16','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa17','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa18','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa19','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa20','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa21','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa22','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa23','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa24','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa25','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa26','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa27','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa28','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa29','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa30','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa31','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa32','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa33','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa34','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa35','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa36','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa37','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa38','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa39','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa40','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa41','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa42','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa43','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa44','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa45','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa46','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa47','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa48','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa49','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa50','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa51','aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa52') NO NULL
|
||||
column_number_6 enum('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','65','66','67','68','69','70','71','72','73','74','75','76','77','78','79','80','81','82','83','84','85','86','87','88','89','90','91','92','93','94','95','96','97','98','99','100','101','102','103','104','105','106','107','108','109','110','111','112','113','114','115','116','117','118','119','120','121','122','123','124','125','126','127','128','129','130','131') NO NULL
|
||||
column_number_7 enum('1','2','3','4','5','6','7') NO NULL
|
||||
column_number_8 enum('8') NO NULL
|
||||
column_number_9 enum('9') NO NULL
|
||||
column_number_10 varchar(10) NO NULL
|
||||
column_number_11 enum('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49') NO NULL
|
||||
drop table test_table;
|
@@ -421,4 +421,99 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# MDEV-7370: Server deadlocks on renaming a table for which persistent statistics exists
|
||||
#
|
||||
drop database if exists db1;
|
||||
drop database if exists db1;
|
||||
create database db1;
|
||||
create database db2;
|
||||
use db1;
|
||||
#
|
||||
# First, run the original testcase:
|
||||
#
|
||||
create table t1 (i int);
|
||||
insert into t1 values (10),(20);
|
||||
analyze table t1 persistent for all;
|
||||
Table Op Msg_type Msg_text
|
||||
db1.t1 analyze status Engine-independent statistics collected
|
||||
db1.t1 analyze status OK
|
||||
rename table t1 to db2.t1;
|
||||
# Verify that stats in the old database are gone:
|
||||
select * from mysql.column_stats where db_name='db1' and table_name='t1';
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
select * from mysql.table_stats where db_name='db1' and table_name='t1';
|
||||
db_name table_name cardinality
|
||||
# Verify that stats are present in the new database:
|
||||
select * from mysql.column_stats where db_name='db2' and table_name='t1';
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
db2 t1 i 10 20 0.0000 4.0000 1.0000 0 NULL NULL
|
||||
select * from mysql.table_stats where db_name='db2' and table_name='t1';
|
||||
db_name table_name cardinality
|
||||
db2 t1 2
|
||||
#
|
||||
# Now, try with more than one column and with indexes:
|
||||
#
|
||||
use test;
|
||||
create table t1(a int primary key);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
use db1;
|
||||
create table t2 (a int, b int, c int, key IDX1(a), key IDX2(a,b));
|
||||
insert into t2 select a/10, a/2, a from test.t1;
|
||||
analyze table t2 persistent for all;
|
||||
Table Op Msg_type Msg_text
|
||||
db1.t2 analyze status Engine-independent statistics collected
|
||||
db1.t2 analyze status Table is already up to date
|
||||
alter table t2 rename db2.t2;
|
||||
# Verify that stats in the old database are gone:
|
||||
select * from mysql.table_stats where db_name='db1' and table_name='t2';
|
||||
db_name table_name cardinality
|
||||
select * from mysql.column_stats where db_name='db1' and table_name='t2';
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
select * from mysql.index_stats where db_name='db1' and table_name='t2';
|
||||
db_name table_name index_name prefix_arity avg_frequency
|
||||
# Verify that stats are present in the new database:
|
||||
select * from mysql.table_stats where db_name='db2' and table_name='t2';
|
||||
db_name table_name cardinality
|
||||
db2 t2 10
|
||||
select * from mysql.column_stats where db_name='db2' and table_name='t2';
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
db2 t2 a 0 1 0.0000 4.0000 5.0000 0 NULL NULL
|
||||
db2 t2 b 0 5 0.0000 4.0000 1.6667 0 NULL NULL
|
||||
db2 t2 c 0 9 0.0000 4.0000 1.0000 0 NULL NULL
|
||||
select * from mysql.index_stats where db_name='db2' and table_name='t2';
|
||||
db_name table_name index_name prefix_arity avg_frequency
|
||||
db2 t2 IDX1 1 5.0000
|
||||
db2 t2 IDX2 1 5.0000
|
||||
db2 t2 IDX2 2 1.6667
|
||||
use db2;
|
||||
#
|
||||
# Now, rename within the same database and verify:
|
||||
#
|
||||
rename table t2 to t3;
|
||||
# No stats under old name:
|
||||
select * from mysql.table_stats where db_name='db2' and table_name='t2';
|
||||
db_name table_name cardinality
|
||||
select * from mysql.column_stats where db_name='db2' and table_name='t2';
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
select * from mysql.index_stats where db_name='db2' and table_name='t2';
|
||||
db_name table_name index_name prefix_arity avg_frequency
|
||||
# Stats under the new name:
|
||||
select * from mysql.table_stats where db_name='db2' and table_name='t3';
|
||||
db_name table_name cardinality
|
||||
db2 t3 10
|
||||
select * from mysql.column_stats where db_name='db2' and table_name='t3';
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
db2 t3 a 0 1 0.0000 4.0000 5.0000 0 NULL NULL
|
||||
db2 t3 b 0 5 0.0000 4.0000 1.6667 0 NULL NULL
|
||||
db2 t3 c 0 9 0.0000 4.0000 1.0000 0 NULL NULL
|
||||
select * from mysql.index_stats where db_name='db2' and table_name='t3';
|
||||
db_name table_name index_name prefix_arity avg_frequency
|
||||
db2 t3 IDX1 1 5.0000
|
||||
db2 t3 IDX2 1 5.0000
|
||||
db2 t3 IDX2 2 1.6667
|
||||
use test;
|
||||
drop database db1;
|
||||
drop database db2;
|
||||
drop table t1;
|
||||
set use_stat_tables=@save_use_stat_tables;
|
||||
|
@@ -448,6 +448,101 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const PRIMARY PRIMARY 4 const 1 Using index
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using where
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# MDEV-7370: Server deadlocks on renaming a table for which persistent statistics exists
|
||||
#
|
||||
drop database if exists db1;
|
||||
drop database if exists db1;
|
||||
create database db1;
|
||||
create database db2;
|
||||
use db1;
|
||||
#
|
||||
# First, run the original testcase:
|
||||
#
|
||||
create table t1 (i int);
|
||||
insert into t1 values (10),(20);
|
||||
analyze table t1 persistent for all;
|
||||
Table Op Msg_type Msg_text
|
||||
db1.t1 analyze status Engine-independent statistics collected
|
||||
db1.t1 analyze status OK
|
||||
rename table t1 to db2.t1;
|
||||
# Verify that stats in the old database are gone:
|
||||
select * from mysql.column_stats where db_name='db1' and table_name='t1';
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
select * from mysql.table_stats where db_name='db1' and table_name='t1';
|
||||
db_name table_name cardinality
|
||||
# Verify that stats are present in the new database:
|
||||
select * from mysql.column_stats where db_name='db2' and table_name='t1';
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
db2 t1 i 10 20 0.0000 4.0000 1.0000 0 NULL NULL
|
||||
select * from mysql.table_stats where db_name='db2' and table_name='t1';
|
||||
db_name table_name cardinality
|
||||
db2 t1 2
|
||||
#
|
||||
# Now, try with more than one column and with indexes:
|
||||
#
|
||||
use test;
|
||||
create table t1(a int primary key);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
use db1;
|
||||
create table t2 (a int, b int, c int, key IDX1(a), key IDX2(a,b));
|
||||
insert into t2 select a/10, a/2, a from test.t1;
|
||||
analyze table t2 persistent for all;
|
||||
Table Op Msg_type Msg_text
|
||||
db1.t2 analyze status Engine-independent statistics collected
|
||||
db1.t2 analyze status OK
|
||||
alter table t2 rename db2.t2;
|
||||
# Verify that stats in the old database are gone:
|
||||
select * from mysql.table_stats where db_name='db1' and table_name='t2';
|
||||
db_name table_name cardinality
|
||||
select * from mysql.column_stats where db_name='db1' and table_name='t2';
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
select * from mysql.index_stats where db_name='db1' and table_name='t2';
|
||||
db_name table_name index_name prefix_arity avg_frequency
|
||||
# Verify that stats are present in the new database:
|
||||
select * from mysql.table_stats where db_name='db2' and table_name='t2';
|
||||
db_name table_name cardinality
|
||||
db2 t2 10
|
||||
select * from mysql.column_stats where db_name='db2' and table_name='t2';
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
db2 t2 a 0 1 0.0000 4.0000 5.0000 0 NULL NULL
|
||||
db2 t2 b 0 5 0.0000 4.0000 1.6667 0 NULL NULL
|
||||
db2 t2 c 0 9 0.0000 4.0000 1.0000 0 NULL NULL
|
||||
select * from mysql.index_stats where db_name='db2' and table_name='t2';
|
||||
db_name table_name index_name prefix_arity avg_frequency
|
||||
db2 t2 IDX1 1 5.0000
|
||||
db2 t2 IDX2 1 5.0000
|
||||
db2 t2 IDX2 2 1.6667
|
||||
use db2;
|
||||
#
|
||||
# Now, rename within the same database and verify:
|
||||
#
|
||||
rename table t2 to t3;
|
||||
# No stats under old name:
|
||||
select * from mysql.table_stats where db_name='db2' and table_name='t2';
|
||||
db_name table_name cardinality
|
||||
select * from mysql.column_stats where db_name='db2' and table_name='t2';
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
select * from mysql.index_stats where db_name='db2' and table_name='t2';
|
||||
db_name table_name index_name prefix_arity avg_frequency
|
||||
# Stats under the new name:
|
||||
select * from mysql.table_stats where db_name='db2' and table_name='t3';
|
||||
db_name table_name cardinality
|
||||
db2 t3 10
|
||||
select * from mysql.column_stats where db_name='db2' and table_name='t3';
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
db2 t3 a 0 1 0.0000 4.0000 5.0000 0 NULL NULL
|
||||
db2 t3 b 0 5 0.0000 4.0000 1.6667 0 NULL NULL
|
||||
db2 t3 c 0 9 0.0000 4.0000 1.0000 0 NULL NULL
|
||||
select * from mysql.index_stats where db_name='db2' and table_name='t3';
|
||||
db_name table_name index_name prefix_arity avg_frequency
|
||||
db2 t3 IDX1 1 5.0000
|
||||
db2 t3 IDX2 1 5.0000
|
||||
db2 t3 IDX2 2 1.6667
|
||||
use test;
|
||||
drop database db1;
|
||||
drop database db2;
|
||||
drop table t1;
|
||||
set use_stat_tables=@save_use_stat_tables;
|
||||
set optimizer_switch=@save_optimizer_switch_for_stat_tables_test;
|
||||
SET SESSION STORAGE_ENGINE=DEFAULT;
|
||||
|
@@ -1622,3 +1622,22 @@ test t2 id 1 1024 0.0000 8.0000 63 SINGLE_PREC_HB 03070B0F13171B1F23272B2F33373B
|
||||
set histogram_size=default;
|
||||
drop table t1, t2;
|
||||
set use_stat_tables=@save_use_stat_tables;
|
||||
#
|
||||
# Bug MDEV-7383: min/max value for a column not utf8 compatible
|
||||
#
|
||||
create table t1 (a varchar(100)) engine=MyISAM;
|
||||
insert into t1 values(unhex('D879626AF872675F73E662F8'));
|
||||
analyze table t1 persistent for all;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze status OK
|
||||
show warnings;
|
||||
Level Code Message
|
||||
select db_name, table_name, column_name,
|
||||
HEX(min_value), HEX(max_value),
|
||||
nulls_ratio, avg_frequency,
|
||||
hist_size, hist_type, HEX(histogram)
|
||||
FROM mysql.column_stats;
|
||||
db_name table_name column_name HEX(min_value) HEX(max_value) nulls_ratio avg_frequency hist_size hist_type HEX(histogram)
|
||||
test t1 a D879626AF872675F73E662F8 D879626AF872675F73E662F8 0.0000 1.0000 0 NULL NULL
|
||||
drop table t1;
|
||||
|
@@ -287,8 +287,8 @@ column_stats CREATE TABLE `column_stats` (
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`column_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`min_value` varchar(255) COLLATE utf8_bin DEFAULT NULL,
|
||||
`max_value` varchar(255) COLLATE utf8_bin DEFAULT NULL,
|
||||
`min_value` varbinary(255) DEFAULT NULL,
|
||||
`max_value` varbinary(255) DEFAULT NULL,
|
||||
`nulls_ratio` decimal(12,4) DEFAULT NULL,
|
||||
`avg_length` decimal(12,4) DEFAULT NULL,
|
||||
`avg_frequency` decimal(12,4) DEFAULT NULL,
|
||||
|
@@ -287,8 +287,8 @@ column_stats CREATE TABLE `column_stats` (
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`column_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`min_value` varchar(255) COLLATE utf8_bin DEFAULT NULL,
|
||||
`max_value` varchar(255) COLLATE utf8_bin DEFAULT NULL,
|
||||
`min_value` varbinary(255) DEFAULT NULL,
|
||||
`max_value` varbinary(255) DEFAULT NULL,
|
||||
`nulls_ratio` decimal(12,4) DEFAULT NULL,
|
||||
`avg_length` decimal(12,4) DEFAULT NULL,
|
||||
`avg_frequency` decimal(12,4) DEFAULT NULL,
|
||||
|
@@ -287,8 +287,8 @@ column_stats CREATE TABLE `column_stats` (
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`column_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`min_value` varchar(255) COLLATE utf8_bin DEFAULT NULL,
|
||||
`max_value` varchar(255) COLLATE utf8_bin DEFAULT NULL,
|
||||
`min_value` varbinary(255) DEFAULT NULL,
|
||||
`max_value` varbinary(255) DEFAULT NULL,
|
||||
`nulls_ratio` decimal(12,4) DEFAULT NULL,
|
||||
`avg_length` decimal(12,4) DEFAULT NULL,
|
||||
`avg_frequency` decimal(12,4) DEFAULT NULL,
|
||||
|
@@ -287,8 +287,8 @@ column_stats CREATE TABLE `column_stats` (
|
||||
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`column_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`min_value` varchar(255) COLLATE utf8_bin DEFAULT NULL,
|
||||
`max_value` varchar(255) COLLATE utf8_bin DEFAULT NULL,
|
||||
`min_value` varbinary(255) DEFAULT NULL,
|
||||
`max_value` varbinary(255) DEFAULT NULL,
|
||||
`nulls_ratio` decimal(12,4) DEFAULT NULL,
|
||||
`avg_length` decimal(12,4) DEFAULT NULL,
|
||||
`avg_frequency` decimal(12,4) DEFAULT NULL,
|
||||
|
6
mysql-test/r/udf_notembedded.result
Normal file
6
mysql-test/r/udf_notembedded.result
Normal file
@@ -0,0 +1,6 @@
|
||||
create function sequence returns integer soname "UDF_EXAMPLE_LIB";
|
||||
create table t1 (n int key not null auto_increment, msg int as (sequence()) virtual);
|
||||
select * from t1;
|
||||
n msg
|
||||
drop table t1;
|
||||
drop function sequence;
|
@@ -619,6 +619,65 @@ Handler_update 5
|
||||
ROLLBACK;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# MDEV-8938: Server Crash on Update with joins
|
||||
#
|
||||
CREATE TABLE `t1` (
|
||||
`name` varchar(255) NOT NULL,
|
||||
`value` varchar(4095) DEFAULT NULL,
|
||||
PRIMARY KEY (`name`)
|
||||
);
|
||||
UPDATE `t1` SET value = CONCAT("*.",(SELECT `temptable`.`value` FROM (SELECT * FROM `t1` WHERE `name`="consoleproxy.url.domain") AS `temptable` WHERE `temptable`.`name`="consoleproxy.url.domain")) WHERE `name`="consoleproxy.url.domain";
|
||||
drop table t1;
|
||||
CREATE TABLE `t1` (
|
||||
`name` varchar(255) NOT NULL,
|
||||
`value` varchar(4095) DEFAULT NULL,
|
||||
PRIMARY KEY (`name`)
|
||||
);
|
||||
create table t2 (
|
||||
`name` varchar(255) NOT NULL,
|
||||
`value` varchar(4095) DEFAULT NULL,
|
||||
PRIMARY KEY (`name`)
|
||||
);
|
||||
UPDATE t1
|
||||
SET value = (SELECT value FROM t2 WHERE `name`= t1.name)
|
||||
WHERE value is null ;
|
||||
drop table t1,t2;
|
||||
#
|
||||
#MDEV-8701: Crash on derived query
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
data_exit_entry_id int(11) NOT NULL,
|
||||
data_entry_id int(11) NOT NULL,
|
||||
data_entry_exit_id int(11) NOT NULL,
|
||||
data_exit_entry_quantity double NOT NULL
|
||||
) DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE t2 (
|
||||
data_entry_id int(11) NOT NULL,
|
||||
data_entry_cost double NOT NULL,
|
||||
data_entry_quantity double NOT NULL
|
||||
) DEFAULT CHARSET=utf8;
|
||||
create algorithm=temptable view v1 as SELECT data_entry_exit_id, data_exit_entry_quantity, data_entry_cost
|
||||
FROM t1 INNER JOIN t2 as dt ON dt.data_entry_id = t1.data_entry_id;
|
||||
UPDATE t2
|
||||
SET data_entry_cost
|
||||
= ( ( SELECT SUM(data_exit_entry_quantity * data_entry_cost)
|
||||
FROM
|
||||
v1 AS query
|
||||
WHERE data_entry_exit_id = t2.data_entry_id
|
||||
)
|
||||
);
|
||||
UPDATE t2
|
||||
SET data_entry_cost
|
||||
= ( ( SELECT SUM(data_exit_entry_quantity * data_entry_cost)
|
||||
FROM
|
||||
( SELECT data_entry_exit_id, data_exit_entry_quantity, data_entry_cost
|
||||
FROM t1 INNER JOIN t2 as dt ON dt.data_entry_id = t1.data_entry_id) AS query
|
||||
WHERE data_entry_exit_id = t2.data_entry_id
|
||||
)
|
||||
);
|
||||
drop view v1;
|
||||
drop table t1, t2;
|
||||
#
|
||||
# MDEV-4410: update does not want to use a covering index, but select uses it.
|
||||
#
|
||||
create table t2(a int);
|
||||
|
@@ -5477,6 +5477,39 @@ UPDATE t1, t2 SET a = 1 WHERE a IN ( SELECT 0 FROM v3 );
|
||||
EXECUTE stmt;
|
||||
DROP TABLE t1, t2, t3;
|
||||
DROP VIEW v3;
|
||||
#
|
||||
# MDEV-8632: Segmentation fault on INSERT
|
||||
#
|
||||
CREATE TABLE `t1` (
|
||||
`id` int(10) unsigned NOT NULL,
|
||||
`r` float NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
create view v1 as select id, if(r=r,1,2) as d from t1;
|
||||
create view v2 as
|
||||
select id,
|
||||
d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d as p
|
||||
from v1;
|
||||
insert into t1 (id, r)
|
||||
select id,p from
|
||||
(
|
||||
select id,
|
||||
d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d+d as p
|
||||
from (
|
||||
select id, if(r=r,1,2) as d
|
||||
from t1
|
||||
) a
|
||||
) b
|
||||
on duplicate key update r=p;
|
||||
insert into t1 (id, r)
|
||||
select id,p from v2
|
||||
on duplicate key update r=p;
|
||||
prepare stmt from "insert into t1 (id, r) select id,p from v2 on duplicate key update r=p";
|
||||
execute stmt;
|
||||
execute stmt;
|
||||
deallocate prepare stmt;
|
||||
drop view v1,v2;
|
||||
drop table `t1`;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.5 tests.
|
||||
# -----------------------------------------------------------------
|
||||
@@ -5699,6 +5732,47 @@ idAlbum strAlbum strMusicBrainzAlbumID strArtists strGenres iYear strMoods strSt
|
||||
1 strAlbum1 strMusicBrainzAlbumID1 strArtists1 strGenres1 2000 NULL NULL NULL NULL NULL NULL NULL NULL 0 0 album 1 1 strArtist1 strMusicBrainzArtistID 0 0
|
||||
drop view v1,v2;
|
||||
drop table t1,t2,t3,t4;
|
||||
#
|
||||
# MDEV-8913: Derived queries with same column names as final
|
||||
# projection causes issues when using Order By
|
||||
#
|
||||
create table t1 (field int);
|
||||
insert into t1 values (10),(5),(3),(8),(20);
|
||||
SELECT sq.f2 AS f1, sq.f1 AS f2
|
||||
FROM ( SELECT field AS f1, 1 AS f2 FROM t1) AS sq
|
||||
ORDER BY sq.f1;
|
||||
f1 f2
|
||||
1 3
|
||||
1 5
|
||||
1 8
|
||||
1 10
|
||||
1 20
|
||||
create view v1 as SELECT field AS f1, 1 AS f2 FROM t1;
|
||||
SELECT sq.f2 AS f1, sq.f1 AS f2
|
||||
FROM v1 AS sq
|
||||
ORDER BY sq.f1;
|
||||
f1 f2
|
||||
1 3
|
||||
1 5
|
||||
1 8
|
||||
1 10
|
||||
1 20
|
||||
drop view v1;
|
||||
create table t2 SELECT field AS f1, 1 AS f2 FROM t1;
|
||||
SELECT
|
||||
sq.f2 AS f1,
|
||||
sq.f1 AS f2
|
||||
FROM t2 AS sq
|
||||
ORDER BY sq.f1;
|
||||
f1 f2
|
||||
1 3
|
||||
1 5
|
||||
1 8
|
||||
1 10
|
||||
1 20
|
||||
drop table t1, t2;
|
||||
SELECT 1 FROM (SELECT 1 as a) AS b HAVING (SELECT `SOME_GARBAGE`.b.a)=1;
|
||||
ERROR 42S22: Unknown column 'SOME_GARBAGE.b.a' in 'field list'
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 10.0 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
27
mysql-test/suite/federated/error_on_close-8313.result
Normal file
27
mysql-test/suite/federated/error_on_close-8313.result
Normal file
@@ -0,0 +1,27 @@
|
||||
CREATE DATABASE federated;
|
||||
CREATE DATABASE federated;
|
||||
connection slave;
|
||||
create table t1 (foo int, bar int);
|
||||
connection master;
|
||||
create server 's1' foreign data wrapper 'mysql' options
|
||||
(HOST 'localhost',
|
||||
DATABASE 'test',
|
||||
USER 'root',
|
||||
PASSWORD '',
|
||||
SOCKET 'SLAVE_MYSOCK');
|
||||
create table t1 (foo integer, bar integer) engine=federated
|
||||
connection='s1';
|
||||
select * from t1;
|
||||
foo bar
|
||||
connection slave;
|
||||
connection master;
|
||||
drop table t1;
|
||||
drop server s1;
|
||||
connection slave;
|
||||
drop table t1;
|
||||
connection master;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
||||
connection slave;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE IF EXISTS federated;
|
38
mysql-test/suite/federated/error_on_close-8313.test
Normal file
38
mysql-test/suite/federated/error_on_close-8313.test
Normal file
@@ -0,0 +1,38 @@
|
||||
#
|
||||
# MDEV-8313 Got an error writing communication packets
|
||||
#
|
||||
source include/federated.inc;
|
||||
|
||||
enable_connect_log;
|
||||
|
||||
connection slave;
|
||||
create table t1 (foo int, bar int);
|
||||
|
||||
connection master;
|
||||
|
||||
--replace_result $SLAVE_MYSOCK SLAVE_MYSOCK
|
||||
eval create server 's1' foreign data wrapper 'mysql' options
|
||||
(HOST 'localhost',
|
||||
DATABASE 'test',
|
||||
USER 'root',
|
||||
PASSWORD '',
|
||||
SOCKET '$SLAVE_MYSOCK');
|
||||
|
||||
|
||||
eval create table t1 (foo integer, bar integer) engine=federated
|
||||
connection='s1';
|
||||
|
||||
select * from t1;
|
||||
|
||||
connection slave;
|
||||
source include/restart_mysqld.inc;
|
||||
|
||||
connection master;
|
||||
drop table t1;
|
||||
drop server s1;
|
||||
|
||||
connection slave;
|
||||
drop table t1;
|
||||
|
||||
source include/federated_cleanup.inc;
|
||||
|
@@ -16,8 +16,8 @@ def mysql column_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8
|
||||
def mysql column_stats histogram 11 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255) select,insert,update,references
|
||||
def mysql column_stats hist_size 9 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned select,insert,update,references
|
||||
def mysql column_stats hist_type 10 NULL YES enum 14 42 NULL NULL NULL utf8 utf8_bin enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') select,insert,update,references
|
||||
def mysql column_stats max_value 5 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255) select,insert,update,references
|
||||
def mysql column_stats min_value 4 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255) select,insert,update,references
|
||||
def mysql column_stats max_value 5 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255) select,insert,update,references
|
||||
def mysql column_stats min_value 4 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255) select,insert,update,references
|
||||
def mysql column_stats nulls_ratio 6 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references
|
||||
def mysql column_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references
|
||||
def mysql db Alter_priv 13 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
|
||||
@@ -330,8 +330,8 @@ NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp
|
||||
3.0000 mysql column_stats db_name varchar 64 192 utf8 utf8_bin varchar(64)
|
||||
3.0000 mysql column_stats table_name varchar 64 192 utf8 utf8_bin varchar(64)
|
||||
3.0000 mysql column_stats column_name varchar 64 192 utf8 utf8_bin varchar(64)
|
||||
3.0000 mysql column_stats min_value varchar 255 765 utf8 utf8_bin varchar(255)
|
||||
3.0000 mysql column_stats max_value varchar 255 765 utf8 utf8_bin varchar(255)
|
||||
1.0000 mysql column_stats min_value varbinary 255 255 NULL NULL varbinary(255)
|
||||
1.0000 mysql column_stats max_value varbinary 255 255 NULL NULL varbinary(255)
|
||||
NULL mysql column_stats nulls_ratio decimal NULL NULL NULL NULL decimal(12,4)
|
||||
NULL mysql column_stats avg_length decimal NULL NULL NULL NULL decimal(12,4)
|
||||
NULL mysql column_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
|
||||
|
@@ -16,8 +16,8 @@ def mysql column_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8
|
||||
def mysql column_stats histogram 11 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255)
|
||||
def mysql column_stats hist_size 9 NULL YES tinyint NULL NULL 3 0 NULL NULL NULL tinyint(3) unsigned
|
||||
def mysql column_stats hist_type 10 NULL YES enum 14 42 NULL NULL NULL utf8 utf8_bin enum('SINGLE_PREC_HB','DOUBLE_PREC_HB')
|
||||
def mysql column_stats max_value 5 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255)
|
||||
def mysql column_stats min_value 4 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255)
|
||||
def mysql column_stats max_value 5 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255)
|
||||
def mysql column_stats min_value 4 NULL YES varbinary 255 255 NULL NULL NULL NULL NULL varbinary(255)
|
||||
def mysql column_stats nulls_ratio 6 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4)
|
||||
def mysql column_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
|
||||
def mysql db Alter_priv 13 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
|
||||
@@ -330,8 +330,8 @@ NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp
|
||||
3.0000 mysql column_stats db_name varchar 64 192 utf8 utf8_bin varchar(64)
|
||||
3.0000 mysql column_stats table_name varchar 64 192 utf8 utf8_bin varchar(64)
|
||||
3.0000 mysql column_stats column_name varchar 64 192 utf8 utf8_bin varchar(64)
|
||||
3.0000 mysql column_stats min_value varchar 255 765 utf8 utf8_bin varchar(255)
|
||||
3.0000 mysql column_stats max_value varchar 255 765 utf8 utf8_bin varchar(255)
|
||||
1.0000 mysql column_stats min_value varbinary 255 255 NULL NULL varbinary(255)
|
||||
1.0000 mysql column_stats max_value varbinary 255 255 NULL NULL varbinary(255)
|
||||
NULL mysql column_stats nulls_ratio decimal NULL NULL NULL NULL decimal(12,4)
|
||||
NULL mysql column_stats avg_length decimal NULL NULL NULL NULL decimal(12,4)
|
||||
NULL mysql column_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
|
||||
|
9
mysql-test/suite/innodb/r/dropdb.result
Normal file
9
mysql-test/suite/innodb/r/dropdb.result
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# Bug #19929435 DROP DATABASE HANGS WITH MALFORMED TABLE
|
||||
#
|
||||
set session default_storage_engine=innodb;
|
||||
create database `b`;
|
||||
use `b`;
|
||||
create table `#mysql50#q.q` select 1;
|
||||
ERROR 42000: Incorrect table name '#mysql50#q.q'
|
||||
drop database `b`;
|
@@ -568,7 +568,7 @@ Variable_name Value
|
||||
auto_increment_increment 65535
|
||||
auto_increment_offset 65535
|
||||
INSERT INTO t1 VALUES (NULL),(NULL);
|
||||
ERROR 22003: Out of range value for column 'c1' at row 1
|
||||
ERROR HY000: Failed to read auto-increment value from storage engine
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
@@ -642,6 +642,18 @@ PRIMARY KEY (m)) ENGINE = InnoDB;
|
||||
INSERT INTO t2 (n,o) VALUES
|
||||
(1 , 'true'), (1 , 'false'), (2 , 'true'), (2 , 'false'), (3 , 'true'),
|
||||
(3 , 'false'), (4 , 'true'), (4 , 'false'), (5 , 'true'), (5 , 'false');
|
||||
SELECT * FROM t2;
|
||||
m n o
|
||||
1 1 TRUE
|
||||
2 1 FALSE
|
||||
3 2 TRUE
|
||||
4 2 FALSE
|
||||
5 3 TRUE
|
||||
6 3 FALSE
|
||||
7 4 TRUE
|
||||
8 4 FALSE
|
||||
9 5 TRUE
|
||||
10 5 FALSE
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
@@ -649,7 +661,7 @@ t2 CREATE TABLE `t2` (
|
||||
`n` int(10) unsigned NOT NULL,
|
||||
`o` enum('FALSE','TRUE') DEFAULT NULL,
|
||||
PRIMARY KEY (`m`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 (b,c) SELECT n,o FROM t2 ;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
|
40
mysql-test/suite/innodb/r/innodb-dict.result
Normal file
40
mysql-test/suite/innodb/r/innodb-dict.result
Normal file
@@ -0,0 +1,40 @@
|
||||
CREATE TABLE t1 (D INT) ENGINE=innodb;
|
||||
INSERT INTO t1 VALUES (10);
|
||||
ALTER TABLE t1 MODIFY COLUMN d INT;
|
||||
ALTER TABLE t1 ADD INDEX my_d (d);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` int(11) DEFAULT NULL,
|
||||
KEY `my_d` (`d`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
EXPLAIN SELECT d FROM t1 WHERE d = 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref my_d my_d 5 const 128 Using index
|
||||
EXPLAIN SELECT D FROM t1 WHERE D = 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref my_d my_d 5 const 128 Using index
|
||||
ALTER TABLE t1 DROP INDEX my_d;
|
||||
ALTER TABLE t1 MODIFY COLUMN D INT;
|
||||
ALTER TABLE t1 ADD INDEX my_d (D);
|
||||
EXPLAIN SELECT d FROM t1 WHERE d = 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref my_d my_d 5 const 128 Using index
|
||||
EXPLAIN SELECT D FROM t1 WHERE D = 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ref my_d my_d 5 const 128 Using index
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`D` int(11) DEFAULT NULL,
|
||||
KEY `my_d` (`D`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
@@ -25,7 +25,7 @@ create table t2(a int, constraint a foreign key a (a) references t1(a)) engine=i
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Create table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns. Error close to foreign key a (a) references t1(a)) engine=innodb.
|
||||
Warning 150 Create table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near ' foreign key a (a) references t1(a)) engine=innodb'.
|
||||
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint
|
||||
drop table t1;
|
||||
@@ -42,7 +42,7 @@ alter table t2 add constraint b foreign key (b) references t2(b);
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Alter table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns. Error close to foreign key (b) references t2(b).
|
||||
Warning 150 Alter table '`test`.`t2`' with foreign key constraint failed. There is no index in the referenced table where the referenced columns appear as the first columns near ' foreign key (b) references t2(b)'.
|
||||
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint
|
||||
drop table t2, t1;
|
||||
@@ -51,7 +51,7 @@ alter table t1 add constraint c1 foreign key (f1) references t11(f1);
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Alter table `test`.`t1` with foreign key constraint failed. Referenced table `test`.`t11` not found in the data dictionary close to foreign key (f1) references t11(f1).
|
||||
Warning 150 Alter table `test`.`t1` with foreign key constraint failed. Referenced table `test`.`t11` not found in the data dictionary near ' foreign key (f1) references t11(f1)'.
|
||||
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint
|
||||
drop table t1;
|
||||
@@ -90,14 +90,14 @@ alter table t1 add constraint c1 foreign key (f1) references t1(f1) on update se
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Alter table `test`.`t1` with foreign key constraint failed. You have defined a SET NULL condition but column f1 is defined as NOT NULL in foreign key (f1) references t1(f1) on update set null close to on update set null.
|
||||
Warning 150 Alter table `test`.`t1` with foreign key constraint failed. You have defined a SET NULL condition but column 'f1' is defined as NOT NULL in ' foreign key (f1) references t1(f1) on update set null' near ' on update set null'.
|
||||
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint
|
||||
create table t2(a int not null, foreign key(a) references t1(f1) on delete set null) engine=innodb;
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Create table `test`.`t2` with foreign key constraint failed. You have defined a SET NULL condition but column a is defined as NOT NULL in foreign key(a) references t1(f1) on delete set null) engine=innodb close to on delete set null) engine=innodb.
|
||||
Warning 150 Create table `test`.`t2` with foreign key constraint failed. You have defined a SET NULL condition but column 'a' is defined as NOT NULL in 'foreign key(a) references t1(f1) on delete set null) engine=innodb' near ' on delete set null) engine=innodb'.
|
||||
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint
|
||||
drop table t1;
|
||||
@@ -106,7 +106,7 @@ create table t2(a char(20), key(a), foreign key(a) references t1(f1)) engine=inn
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Create table `test`.`t2` with foreign key constraint failed. Field type or character set for column a does not mach referenced column f1 close to foreign key(a) references t1(f1)) engine=innodb
|
||||
Warning 150 Create table `test`.`t2` with foreign key constraint failed. Field type or character set for column 'a' does not mach referenced column 'f1' near 'foreign key(a) references t1(f1)) engine=innodb'.
|
||||
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint
|
||||
drop table t1;
|
||||
|
@@ -50,8 +50,8 @@ CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE
|
||||
ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Create table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary close to FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB.
|
||||
Warning 150 Create table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary near ' FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB'.
|
||||
Error 1005 Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint
|
||||
CREATE TABLE t2 (
|
||||
@@ -65,7 +65,7 @@ ALTER TABLE t2 ADD CONSTRAINT fk3 FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE
|
||||
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 150 Alter table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary close to FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE.
|
||||
Warning 150 Alter table `test`.`t2` with foreign key constraint failed. Referenced table `test`.`t3` not found in the data dictionary near ' FOREIGN KEY (f3) REFERENCES t3 (id) ON DELETE CASCADE'.
|
||||
Error 1005 Can't create table `test`.`#sql-temporary` (errno: 150 "Foreign key constraint is incorrectly formed")
|
||||
Warning 1215 Cannot add foreign key constraint
|
||||
drop table t2;
|
||||
|
71
mysql-test/suite/innodb/r/innodb-get-fk.result
Normal file
71
mysql-test/suite/innodb/r/innodb-get-fk.result
Normal file
@@ -0,0 +1,71 @@
|
||||
CREATE SCHEMA `repro`;
|
||||
CREATE TABLE `repro`.`crew` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`code` varchar(50) NOT NULL,
|
||||
`name` varchar(50) NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `code` (`code`)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE `repro`.`pilot` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`code` varchar(50) NOT NULL,
|
||||
`name` varchar(50) NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `code` (`code`)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE `repro`.`crew_role_assigned` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`crew_id` int(11) NOT NULL,
|
||||
`role_code` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
|
||||
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB COMMENT="This is a comment about tables";
|
||||
# Restart mysqld --innodb_read_only_mode=1
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
Table Create Table
|
||||
crew_role_assigned CREATE TABLE `crew_role_assigned` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`crew_id` int(11) NOT NULL,
|
||||
`role_code` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
|
||||
KEY `fk_crewRoleAssigned_pilotId` (`crew_id`),
|
||||
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a comment about tables'
|
||||
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables";
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
Table Create Table
|
||||
crew_role_assigned CREATE TABLE `crew_role_assigned` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`crew_id` int(11) NOT NULL,
|
||||
`role_code` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
|
||||
KEY `fk_crewRoleAssigned_pilotId` (`crew_id`),
|
||||
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables'
|
||||
# Restart mysqld --innodb_read_only_mode=1
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
Table Create Table
|
||||
crew_role_assigned CREATE TABLE `crew_role_assigned` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`crew_id` int(11) NOT NULL,
|
||||
`role_code` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
|
||||
KEY `fk_crewRoleAssigned_pilotId` (`crew_id`),
|
||||
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='This is a new comment about tables'
|
||||
DROP TABLE `repro`.`crew_role_assigned`;
|
||||
DROP TABLE `repro`.`pilot`;
|
||||
DROP TABLE `repro`.`crew`;
|
||||
DROP SCHEMA `repro`;
|
@@ -0,0 +1,20 @@
|
||||
set global innodb_stats_auto_recalc=off;
|
||||
CREATE TABLE t1 (i int) ENGINE=InnoDB;
|
||||
SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
|
||||
NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
|
||||
test/t1 Initialized 0 0
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
|
||||
NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
|
||||
test/t1 Initialized 2 2
|
||||
DELETE FROM t1 WHERE i = 1;
|
||||
SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
|
||||
NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
|
||||
test/t1 Initialized 1 3
|
||||
UPDATE t1 SET i = 4 WHERE i = 2;
|
||||
SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
|
||||
NAME STATS_INITIALIZED NUM_ROWS MODIFIED_COUNTER
|
||||
test/t1 Initialized 1 4
|
||||
DROP TABLE t1;
|
||||
set global innodb_stats_auto_recalc=default;
|
@@ -2,7 +2,7 @@ SET GLOBAL innodb_file_per_table=0;
|
||||
create table bug56947(a int not null) engine = innodb;
|
||||
SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
|
||||
alter table bug56947 add unique index (a);
|
||||
ERROR HY000: Got error 11 "Resource temporarily unavailable" from storage engine InnoDB
|
||||
ERROR HY000: Got error 11 "xxx" from storage engine InnoDB
|
||||
SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename';
|
||||
check table bug56947;
|
||||
Table Op Msg_type Msg_text
|
||||
|
@@ -0,0 +1,2 @@
|
||||
CREATE TABLE t1 ENGINE=InnoDB AS SELECT * FROM mysql.help_topic;
|
||||
DROP TABLE t1;
|
12
mysql-test/suite/innodb/t/dropdb.test
Normal file
12
mysql-test/suite/innodb/t/dropdb.test
Normal file
@@ -0,0 +1,12 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo #
|
||||
--echo # Bug #19929435 DROP DATABASE HANGS WITH MALFORMED TABLE
|
||||
--echo #
|
||||
|
||||
set session default_storage_engine=innodb;
|
||||
create database `b`;
|
||||
use `b`;
|
||||
--error ER_WRONG_TABLE_NAME
|
||||
create table `#mysql50#q.q` select 1;
|
||||
drop database `b`;
|
@@ -351,7 +351,7 @@ INSERT INTO t1 VALUES (18446744073709551610); #-- 2^64 - 2
|
||||
SELECT * FROM t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976;
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
--error 167
|
||||
--error 1467
|
||||
INSERT INTO t1 VALUES (NULL),(NULL);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
@@ -403,6 +403,7 @@ CREATE TABLE t2 (
|
||||
INSERT INTO t2 (n,o) VALUES
|
||||
(1 , 'true'), (1 , 'false'), (2 , 'true'), (2 , 'false'), (3 , 'true'),
|
||||
(3 , 'false'), (4 , 'true'), (4 , 'false'), (5 , 'true'), (5 , 'false');
|
||||
SELECT * FROM t2;
|
||||
SHOW CREATE TABLE t2;
|
||||
INSERT INTO t1 (b,c) SELECT n,o FROM t2 ;
|
||||
SHOW CREATE TABLE t1;
|
||||
|
31
mysql-test/suite/innodb/t/innodb-dict.test
Normal file
31
mysql-test/suite/innodb/t/innodb-dict.test
Normal file
@@ -0,0 +1,31 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
#
|
||||
# Fix MySQL Bug#20755615: InnoDB compares column names case sensitively,
|
||||
# while according to Storage Engine API column names should be compared
|
||||
# case insensitively. This can cause FRM and InnoDB data dictionary to
|
||||
# go out of sync:
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (D INT) ENGINE=innodb;
|
||||
INSERT INTO t1 VALUES (10);
|
||||
ALTER TABLE t1 MODIFY COLUMN d INT;
|
||||
ALTER TABLE t1 ADD INDEX my_d (d);
|
||||
SHOW CREATE TABLE t1;
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
EXPLAIN SELECT d FROM t1 WHERE d = 5;
|
||||
EXPLAIN SELECT D FROM t1 WHERE D = 5;
|
||||
ALTER TABLE t1 DROP INDEX my_d;
|
||||
ALTER TABLE t1 MODIFY COLUMN D INT;
|
||||
ALTER TABLE t1 ADD INDEX my_d (D);
|
||||
EXPLAIN SELECT d FROM t1 WHERE d = 5;
|
||||
EXPLAIN SELECT D FROM t1 WHERE D = 5;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
61
mysql-test/suite/innodb/t/innodb-get-fk.test
Normal file
61
mysql-test/suite/innodb/t/innodb-get-fk.test
Normal file
@@ -0,0 +1,61 @@
|
||||
-- source include/have_innodb.inc
|
||||
# need to restart server
|
||||
-- source include/not_embedded.inc
|
||||
CREATE SCHEMA `repro`;
|
||||
|
||||
CREATE TABLE `repro`.`crew` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`code` varchar(50) NOT NULL,
|
||||
`name` varchar(50) NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `code` (`code`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `repro`.`pilot` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`code` varchar(50) NOT NULL,
|
||||
`name` varchar(50) NOT NULL,
|
||||
`created_at` timestamp NULL DEFAULT NULL,
|
||||
`updated_at` timestamp NULL DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `code` (`code`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE `repro`.`crew_role_assigned` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`crew_id` int(11) NOT NULL,
|
||||
`role_code` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `fk_crewRoleAssigned_roleCode` (`role_code`),
|
||||
CONSTRAINT `fk_crewRoleAssigned_crewId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`crew` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
CONSTRAINT `fk_crewRoleAssigned_pilotId` FOREIGN KEY (`crew_id`) REFERENCES `repro`.`pilot` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB COMMENT="This is a comment about tables";
|
||||
|
||||
--echo # Restart mysqld --innodb_read_only_mode=1
|
||||
-- let $restart_parameters=--innodb-read-only-mode=1
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
ALTER TABLE `repro`.`crew_role_assigned` COMMENT = "This is a new comment about tables";
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
|
||||
--echo # Restart mysqld --innodb_read_only_mode=1
|
||||
-- let $restart_parameters=--innodb-read-only-mode=1
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
#
|
||||
# Below create table should contain also fk definitions
|
||||
#
|
||||
SHOW CREATE TABLE `repro`.`crew_role_assigned`;
|
||||
|
||||
-- source include/restart_mysqld.inc
|
||||
|
||||
DROP TABLE `repro`.`crew_role_assigned`;
|
||||
DROP TABLE `repro`.`pilot`;
|
||||
DROP TABLE `repro`.`crew`;
|
||||
DROP SCHEMA `repro`;
|
@@ -0,0 +1 @@
|
||||
--loose-innodb-sys-tablestats
|
28
mysql-test/suite/innodb/t/innodb-stats-modified-counter.test
Normal file
28
mysql-test/suite/innodb/t/innodb-stats-modified-counter.test
Normal file
@@ -0,0 +1,28 @@
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
#
|
||||
# MDEV-8297: information_schema.innodb_sys_tablestats.modified_counter doesn't change on UPDATE
|
||||
#
|
||||
|
||||
set global innodb_stats_auto_recalc=off;
|
||||
|
||||
CREATE TABLE t1 (i int) ENGINE=InnoDB;
|
||||
|
||||
SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
|
||||
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
|
||||
SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
|
||||
|
||||
DELETE FROM t1 WHERE i = 1;
|
||||
|
||||
SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
|
||||
|
||||
UPDATE t1 SET i = 4 WHERE i = 2;
|
||||
|
||||
SELECT NAME, STATS_INITIALIZED, NUM_ROWS, MODIFIED_COUNTER FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS WHERE NAME = 'test/t1';
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
set global innodb_stats_auto_recalc=default;
|
@@ -8,6 +8,7 @@ SET GLOBAL innodb_file_per_table=0;
|
||||
create table bug56947(a int not null) engine = innodb;
|
||||
|
||||
SET DEBUG_DBUG='+d,ib_rebuild_cannot_rename';
|
||||
--replace_regex /"[^"]*"/"xxx"/
|
||||
--error ER_GET_ERRNO
|
||||
alter table bug56947 add unique index (a);
|
||||
SET DEBUG_DBUG='-d,ib_rebuild_cannot_rename';
|
||||
|
@@ -0,0 +1,29 @@
|
||||
--loose-innodb_trx
|
||||
--loose-innodb_locks
|
||||
--loose-innodb_lock_waits
|
||||
--loose-innodb_cmp
|
||||
--loose-innodb_cmp_reset
|
||||
--loose-innodb_cmp_per_index
|
||||
--loose-innodb_cmp_per_index_reset
|
||||
--loose-innodb_cmpmem
|
||||
--loose-innodb_cmpmem_reset
|
||||
--loose-innodb_buffer_page
|
||||
--loose-innodb_buffer_page_lru
|
||||
--loose-innodb_buffer_stats
|
||||
--loose-innodb_sys_tables
|
||||
--loose-innodb_sys_tablestats
|
||||
--loose-innodb_sys_indexes
|
||||
--loose-innodb_sys_columns
|
||||
--loose-innodb_sys_fields
|
||||
--loose-innodb_sys_foreign
|
||||
--loose-innodb_sys_foreign_cols
|
||||
--loose-innodb_changed_pages
|
||||
--loose-innodb_rseg
|
||||
--loose-innodb_undo_logs
|
||||
--loose-innodb_sys_stats
|
||||
--loose-innodb_table_stats
|
||||
--loose-innodb_index_stats
|
||||
--loose-innodb_admin_command
|
||||
--loose-innodb_buffer_pool_pages
|
||||
--loose-innodb_buffer_pool_pages_index
|
||||
--loose-innodb_buffer_pool_pages_blob
|
@@ -0,0 +1,64 @@
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
#
|
||||
# MDEV-7762 InnoDB: Failing assertion: block->page.buf_fix_count > 0 in buf0buf.ic line 730
|
||||
#
|
||||
# Make sure that all supported information_schema tables are readable
|
||||
# (actual result sets are not important).
|
||||
#
|
||||
CREATE TABLE t1 ENGINE=InnoDB AS SELECT * FROM mysql.help_topic;
|
||||
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
BEGIN;
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCKS;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_LOCK_WAITS;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_CMP;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_CMP_RESET;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_CMPMEM;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_CMPMEM_RESET;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE;
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE_LRU;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_STATS;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_TABLESTATS;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_INDEXES;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_COLUMNS;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FIELDS;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_RSEG;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_UNDO_LOGS;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_STATS;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLE_STATS;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_INDEX_STATS;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_ADMIN_COMMAND;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_PAGES;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_PAGES_INDEX;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_PAGES_BLOB;
|
||||
--error 0,1109
|
||||
SELECT * FROM INFORMATION_SCHEMA.INNODB_CHANGED_PAGES;
|
||||
COMMIT;
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
DROP TABLE t1;
|
@@ -498,7 +498,7 @@ MATCH(a) AGAINST('aaa1* aaa14 aaa15 aaa16' IN BOOLEAN MODE)
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a TEXT) ENGINE = InnoDB;
|
||||
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)) ENGINE = InnoDB;
|
||||
INSERT INTO t1 VALUES('awrd bwrd cwrd'),('awrd bwrd cwrd'),('awrd bwrd cwrd');
|
||||
|
@@ -1,4 +1,4 @@
|
||||
CREATE TABLE `CC` (
|
||||
CREATE TABLE `t2` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
`date_nokey` date DEFAULT NULL,
|
||||
@@ -8,9 +8,9 @@ KEY `int_key` (`int_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
|
||||
Warnings:
|
||||
Note 1831 Duplicate index 'varchar_key' defined on the table 'test.CC'. This is deprecated and will be disallowed in a future release.
|
||||
INSERT INTO `CC` VALUES (10,8,NULL,'2002-02-26 06:14:37'),(11,9,'2006-06-14','1900-01-01 00:00:00'),(12,9,'2002-09-12','2006-12-03 09:37:26'),(13,186,'2005-02-15','2008-05-26 12:27:10'),(14,NULL,NULL,'2004-12-14 16:37:30'),(15,2,'2008-11-04','2003-02-11 21:19:41'),(16,3,'2004-09-04','2009-10-18 02:27:49'),(17,0,'2006-06-05','2000-09-26 07:45:57'),(18,133,'1900-01-01',NULL),(19,1,'1900-01-01','2005-11-10 12:40:29'),(20,8,'1900-01-01','2009-04-25 00:00:00'),(21,5,'2005-01-13','2002-11-27 00:00:00'),(22,5,'2006-05-21','2004-01-26 20:32:32'),(23,8,'2003-09-08','2007-10-26 11:41:40'),(24,6,'2006-12-23','2005-10-07 00:00:00'),(25,51,'2006-10-15','2000-07-15 05:00:34'),(26,4,'2005-04-06','2000-04-03 16:33:32'),(27,7,'2008-04-07',NULL),(28,6,'2006-10-10','2001-04-25 01:26:12'),(29,4,'1900-01-01','2000-12-27 00:00:00');
|
||||
CREATE TABLE `C` (
|
||||
Note 1831 Duplicate index 'varchar_key' defined on the table 'test.t2'. This is deprecated and will be disallowed in a future release.
|
||||
INSERT INTO `t2` VALUES (10,8,NULL,'2002-02-26 06:14:37'),(11,9,'2006-06-14','1900-01-01 00:00:00'),(12,9,'2002-09-12','2006-12-03 09:37:26'),(13,186,'2005-02-15','2008-05-26 12:27:10'),(14,NULL,NULL,'2004-12-14 16:37:30'),(15,2,'2008-11-04','2003-02-11 21:19:41'),(16,3,'2004-09-04','2009-10-18 02:27:49'),(17,0,'2006-06-05','2000-09-26 07:45:57'),(18,133,'1900-01-01',NULL),(19,1,'1900-01-01','2005-11-10 12:40:29'),(20,8,'1900-01-01','2009-04-25 00:00:00'),(21,5,'2005-01-13','2002-11-27 00:00:00'),(22,5,'2006-05-21','2004-01-26 20:32:32'),(23,8,'2003-09-08','2007-10-26 11:41:40'),(24,6,'2006-12-23','2005-10-07 00:00:00'),(25,51,'2006-10-15','2000-07-15 05:00:34'),(26,4,'2005-04-06','2000-04-03 16:33:32'),(27,7,'2008-04-07',NULL),(28,6,'2006-10-10','2001-04-25 01:26:12'),(29,4,'1900-01-01','2000-12-27 00:00:00');
|
||||
CREATE TABLE t1 (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
`date_nokey` date DEFAULT NULL,
|
||||
@@ -20,13 +20,13 @@ KEY `int_key` (`int_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
|
||||
Warnings:
|
||||
Note 1831 Duplicate index 'varchar_key' defined on the table 'test.C'. This is deprecated and will be disallowed in a future release.
|
||||
INSERT INTO `C` VALUES (1,2,NULL,'2004-10-11 18:13:16'),(2,9,'2001-09-19',NULL),(3,3,'2004-09-12','1900-01-01 00:00:00'),(4,9,NULL,'2009-07-25 00:00:00'),(5,NULL,'2002-07-19',NULL),(6,9,'2002-12-16','2008-07-27 00:00:00'),(7,3,'2006-02-08','2002-11-13 16:37:31'),(8,8,'2006-08-28','1900-01-01 00:00:00'),(9,8,'2001-04-14','2003-12-10 00:00:00'),(10,53,'2000-01-05','2001-12-21 22:38:22'),(11,0,'2003-12-06','2008-12-13 23:16:44'),(12,5,'1900-01-01','2005-08-15 12:39:41'),(13,166,'2002-11-27',NULL),(14,3,NULL,'2006-09-11 12:06:14'),(15,0,'2003-05-27','2007-12-15 12:39:34'),(16,1,'2005-05-03','2005-08-09 00:00:00'),(17,9,'2001-04-18','2001-09-02 22:50:02'),(18,5,'2005-12-27','2005-12-16 22:58:11'),(19,6,'2004-08-20','2007-04-19 00:19:53'),(20,2,'1900-01-01','1900-01-01 00:00:00');
|
||||
Note 1831 Duplicate index 'varchar_key' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release.
|
||||
INSERT INTO t1 VALUES (1,2,NULL,'2004-10-11 18:13:16'),(2,9,'2001-09-19',NULL),(3,3,'2004-09-12','1900-01-01 00:00:00'),(4,9,NULL,'2009-07-25 00:00:00'),(5,NULL,'2002-07-19',NULL),(6,9,'2002-12-16','2008-07-27 00:00:00'),(7,3,'2006-02-08','2002-11-13 16:37:31'),(8,8,'2006-08-28','1900-01-01 00:00:00'),(9,8,'2001-04-14','2003-12-10 00:00:00'),(10,53,'2000-01-05','2001-12-21 22:38:22'),(11,0,'2003-12-06','2008-12-13 23:16:44'),(12,5,'1900-01-01','2005-08-15 12:39:41'),(13,166,'2002-11-27',NULL),(14,3,NULL,'2006-09-11 12:06:14'),(15,0,'2003-05-27','2007-12-15 12:39:34'),(16,1,'2005-05-03','2005-08-09 00:00:00'),(17,9,'2001-04-18','2001-09-02 22:50:02'),(18,5,'2005-12-27','2005-12-16 22:58:11'),(19,6,'2004-08-20','2007-04-19 00:19:53'),(20,2,'1900-01-01','1900-01-01 00:00:00');
|
||||
SELECT `pk`
|
||||
FROM C OUTR
|
||||
FROM t1 OUTR
|
||||
WHERE `pk` IN (
|
||||
SELECT `int_key`
|
||||
FROM CC
|
||||
FROM t2
|
||||
WHERE `date_nokey` < `datetime_nokey` XOR OUTR .`date_nokey` ) ;
|
||||
pk
|
||||
9
|
||||
@@ -34,10 +34,10 @@ pk
|
||||
5
|
||||
6
|
||||
SELECT `pk`
|
||||
FROM C
|
||||
FROM t1
|
||||
WHERE `pk` IN (
|
||||
SELECT `int_key`
|
||||
FROM CC
|
||||
FROM t2
|
||||
WHERE `date_nokey` < `datetime_nokey` XOR '2009-11-25' ) ;
|
||||
pk
|
||||
2
|
||||
@@ -62,9 +62,9 @@ Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
Warning 1292 Truncated incorrect INTEGER value: '2009-11-25'
|
||||
DROP TABLE CC;
|
||||
DROP TABLE C;
|
||||
CREATE TABLE `CC` (
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE `t2` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) DEFAULT NULL,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
@@ -77,9 +77,9 @@ KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
|
||||
Warnings:
|
||||
Note 1831 Duplicate index 'varchar_key' defined on the table 'test.CC'. This is deprecated and will be disallowed in a future release.
|
||||
INSERT INTO `CC` VALUES (10,7,8,NULL,'2002-02-26 06:14:37','2002-02-26 06:14:37'),(11,1,9,'2006-06-14','1900-01-01 00:00:00','1900-01-01 00:00:00'),(12,5,9,'2002-09-12','2006-12-03 09:37:26','2006-12-03 09:37:26'),(13,3,186,'2005-02-15','2008-05-26 12:27:10','2008-05-26 12:27:10'),(14,6,NULL,NULL,'2004-12-14 16:37:30','2004-12-14 16:37:30'),(15,92,2,'2008-11-04','2003-02-11 21:19:41','2003-02-11 21:19:41'),(16,7,3,'2004-09-04','2009-10-18 02:27:49','2009-10-18 02:27:49'),(17,NULL,0,'2006-06-05','2000-09-26 07:45:57','2000-09-26 07:45:57'),(18,3,133,'1900-01-01',NULL,NULL),(19,5,1,'1900-01-01','2005-11-10 12:40:29','2005-11-10 12:40:29'),(20,1,8,'1900-01-01','2009-04-25 00:00:00','2009-04-25 00:00:00'),(21,2,5,'2005-01-13','2002-11-27 00:00:00','2002-11-27 00:00:00'),(22,NULL,5,'2006-05-21','2004-01-26 20:32:32','2004-01-26 20:32:32'),(23,1,8,'2003-09-08','2007-10-26 11:41:40','2007-10-26 11:41:40'),(24,0,6,'2006-12-23','2005-10-07 00:00:00','2005-10-07 00:00:00'),(25,210,51,'2006-10-15','2000-07-15 05:00:34','2000-07-15 05:00:34'),(26,8,4,'2005-04-06','2000-04-03 16:33:32','2000-04-03 16:33:32'),(27,7,7,'2008-04-07',NULL,NULL),(28,5,6,'2006-10-10','2001-04-25 01:26:12','2001-04-25 01:26:12'),(29,NULL,4,'1900-01-01','2000-12-27 00:00:00','2000-12-27 00:00:00');
|
||||
CREATE TABLE `C` (
|
||||
Note 1831 Duplicate index 'varchar_key' defined on the table 'test.t2'. This is deprecated and will be disallowed in a future release.
|
||||
INSERT INTO `t2` VALUES (10,7,8,NULL,'2002-02-26 06:14:37','2002-02-26 06:14:37'),(11,1,9,'2006-06-14','1900-01-01 00:00:00','1900-01-01 00:00:00'),(12,5,9,'2002-09-12','2006-12-03 09:37:26','2006-12-03 09:37:26'),(13,3,186,'2005-02-15','2008-05-26 12:27:10','2008-05-26 12:27:10'),(14,6,NULL,NULL,'2004-12-14 16:37:30','2004-12-14 16:37:30'),(15,92,2,'2008-11-04','2003-02-11 21:19:41','2003-02-11 21:19:41'),(16,7,3,'2004-09-04','2009-10-18 02:27:49','2009-10-18 02:27:49'),(17,NULL,0,'2006-06-05','2000-09-26 07:45:57','2000-09-26 07:45:57'),(18,3,133,'1900-01-01',NULL,NULL),(19,5,1,'1900-01-01','2005-11-10 12:40:29','2005-11-10 12:40:29'),(20,1,8,'1900-01-01','2009-04-25 00:00:00','2009-04-25 00:00:00'),(21,2,5,'2005-01-13','2002-11-27 00:00:00','2002-11-27 00:00:00'),(22,NULL,5,'2006-05-21','2004-01-26 20:32:32','2004-01-26 20:32:32'),(23,1,8,'2003-09-08','2007-10-26 11:41:40','2007-10-26 11:41:40'),(24,0,6,'2006-12-23','2005-10-07 00:00:00','2005-10-07 00:00:00'),(25,210,51,'2006-10-15','2000-07-15 05:00:34','2000-07-15 05:00:34'),(26,8,4,'2005-04-06','2000-04-03 16:33:32','2000-04-03 16:33:32'),(27,7,7,'2008-04-07',NULL,NULL),(28,5,6,'2006-10-10','2001-04-25 01:26:12','2001-04-25 01:26:12'),(29,NULL,4,'1900-01-01','2000-12-27 00:00:00','2000-12-27 00:00:00');
|
||||
CREATE TABLE t1 (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) DEFAULT NULL,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
@@ -92,17 +92,17 @@ KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
|
||||
Warnings:
|
||||
Note 1831 Duplicate index 'varchar_key' defined on the table 'test.C'. This is deprecated and will be disallowed in a future release.
|
||||
INSERT INTO `C` VALUES (1,NULL,2,NULL,'2004-10-11 18:13:16','2004-10-11 18:13:16'),(2,7,9,'2001-09-19',NULL,NULL),(3,9,3,'2004-09-12','1900-01-01 00:00:00','1900-01-01 00:00:00'),(4,7,9,NULL,'2009-07-25 00:00:00','2009-07-25 00:00:00'),(5,4,NULL,'2002-07-19',NULL,NULL),(6,2,9,'2002-12-16','2008-07-27 00:00:00','2008-07-27 00:00:00'),(7,6,3,'2006-02-08','2002-11-13 16:37:31','2002-11-13 16:37:31'),(8,8,8,'2006-08-28','1900-01-01 00:00:00','1900-01-01 00:00:00'),(9,NULL,8,'2001-04-14','2003-12-10 00:00:00','2003-12-10 00:00:00'),(10,5,53,'2000-01-05','2001-12-21 22:38:22','2001-12-21 22:38:22'),(11,NULL,0,'2003-12-06','2008-12-13 23:16:44','2008-12-13 23:16:44'),(12,6,5,'1900-01-01','2005-08-15 12:39:41','2005-08-15 12:39:41'),(13,188,166,'2002-11-27',NULL,NULL),(14,2,3,NULL,'2006-09-11 12:06:14','2006-09-11 12:06:14'),(15,1,0,'2003-05-27','2007-12-15 12:39:34','2007-12-15 12:39:34'),(16,1,1,'2005-05-03','2005-08-09 00:00:00','2005-08-09 00:00:00'),(17,0,9,'2001-04-18','2001-09-02 22:50:02','2001-09-02 22:50:02'),(18,9,5,'2005-12-27','2005-12-16 22:58:11','2005-12-16 22:58:11'),(19,NULL,6,'2004-08-20','2007-04-19 00:19:53','2007-04-19 00:19:53'),(20,4,2,'1900-01-01','1900-01-01 00:00:00','1900-01-01 00:00:00');
|
||||
Note 1831 Duplicate index 'varchar_key' defined on the table 'test.t1'. This is deprecated and will be disallowed in a future release.
|
||||
INSERT INTO t1 VALUES (1,NULL,2,NULL,'2004-10-11 18:13:16','2004-10-11 18:13:16'),(2,7,9,'2001-09-19',NULL,NULL),(3,9,3,'2004-09-12','1900-01-01 00:00:00','1900-01-01 00:00:00'),(4,7,9,NULL,'2009-07-25 00:00:00','2009-07-25 00:00:00'),(5,4,NULL,'2002-07-19',NULL,NULL),(6,2,9,'2002-12-16','2008-07-27 00:00:00','2008-07-27 00:00:00'),(7,6,3,'2006-02-08','2002-11-13 16:37:31','2002-11-13 16:37:31'),(8,8,8,'2006-08-28','1900-01-01 00:00:00','1900-01-01 00:00:00'),(9,NULL,8,'2001-04-14','2003-12-10 00:00:00','2003-12-10 00:00:00'),(10,5,53,'2000-01-05','2001-12-21 22:38:22','2001-12-21 22:38:22'),(11,NULL,0,'2003-12-06','2008-12-13 23:16:44','2008-12-13 23:16:44'),(12,6,5,'1900-01-01','2005-08-15 12:39:41','2005-08-15 12:39:41'),(13,188,166,'2002-11-27',NULL,NULL),(14,2,3,NULL,'2006-09-11 12:06:14','2006-09-11 12:06:14'),(15,1,0,'2003-05-27','2007-12-15 12:39:34','2007-12-15 12:39:34'),(16,1,1,'2005-05-03','2005-08-09 00:00:00','2005-08-09 00:00:00'),(17,0,9,'2001-04-18','2001-09-02 22:50:02','2001-09-02 22:50:02'),(18,9,5,'2005-12-27','2005-12-16 22:58:11','2005-12-16 22:58:11'),(19,NULL,6,'2004-08-20','2007-04-19 00:19:53','2007-04-19 00:19:53'),(20,4,2,'1900-01-01','1900-01-01 00:00:00','1900-01-01 00:00:00');
|
||||
SELECT OUTR . `pk` AS X
|
||||
FROM C AS OUTR
|
||||
FROM t1 AS OUTR
|
||||
WHERE OUTR . `pk` IN (
|
||||
SELECT INNR . `int_key` AS Y
|
||||
FROM CC AS INNR
|
||||
FROM t2 AS INNR
|
||||
WHERE INNR . `date_nokey` < INNR . `datetime_nokey` XOR OUTR . `date_nokey` BETWEEN '2004-07-10' AND '2009-11-25'
|
||||
ORDER BY INNR . `int_nokey` ) AND ( OUTR . `datetime_key` BETWEEN '2000-05-25' AND '2004-08-07' OR OUTR . `datetime_nokey` = '2007-10-24' )
|
||||
ORDER BY OUTR . `int_key` , OUTR . `pk`;
|
||||
X
|
||||
9
|
||||
DROP TABLE CC;
|
||||
DROP TABLE C;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# test for BUG#45221 "Query "SELECT pk FROM C WHERE pk IN (SELECT
|
||||
# test for BUG#45221 "Query "SELECT pk FROM t1 WHERE pk IN (SELECT
|
||||
# int_key)" failing"
|
||||
|
||||
--source include/have_debug.inc
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
#/* Begin test case for query 0 */
|
||||
|
||||
CREATE TABLE `CC` (
|
||||
CREATE TABLE `t2` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
`date_nokey` date DEFAULT NULL,
|
||||
@@ -22,8 +22,8 @@ CREATE TABLE `CC` (
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `CC` VALUES (10,8,NULL,'2002-02-26 06:14:37'),(11,9,'2006-06-14','1900-01-01 00:00:00'),(12,9,'2002-09-12','2006-12-03 09:37:26'),(13,186,'2005-02-15','2008-05-26 12:27:10'),(14,NULL,NULL,'2004-12-14 16:37:30'),(15,2,'2008-11-04','2003-02-11 21:19:41'),(16,3,'2004-09-04','2009-10-18 02:27:49'),(17,0,'2006-06-05','2000-09-26 07:45:57'),(18,133,'1900-01-01',NULL),(19,1,'1900-01-01','2005-11-10 12:40:29'),(20,8,'1900-01-01','2009-04-25 00:00:00'),(21,5,'2005-01-13','2002-11-27 00:00:00'),(22,5,'2006-05-21','2004-01-26 20:32:32'),(23,8,'2003-09-08','2007-10-26 11:41:40'),(24,6,'2006-12-23','2005-10-07 00:00:00'),(25,51,'2006-10-15','2000-07-15 05:00:34'),(26,4,'2005-04-06','2000-04-03 16:33:32'),(27,7,'2008-04-07',NULL),(28,6,'2006-10-10','2001-04-25 01:26:12'),(29,4,'1900-01-01','2000-12-27 00:00:00');
|
||||
CREATE TABLE `C` (
|
||||
INSERT INTO `t2` VALUES (10,8,NULL,'2002-02-26 06:14:37'),(11,9,'2006-06-14','1900-01-01 00:00:00'),(12,9,'2002-09-12','2006-12-03 09:37:26'),(13,186,'2005-02-15','2008-05-26 12:27:10'),(14,NULL,NULL,'2004-12-14 16:37:30'),(15,2,'2008-11-04','2003-02-11 21:19:41'),(16,3,'2004-09-04','2009-10-18 02:27:49'),(17,0,'2006-06-05','2000-09-26 07:45:57'),(18,133,'1900-01-01',NULL),(19,1,'1900-01-01','2005-11-10 12:40:29'),(20,8,'1900-01-01','2009-04-25 00:00:00'),(21,5,'2005-01-13','2002-11-27 00:00:00'),(22,5,'2006-05-21','2004-01-26 20:32:32'),(23,8,'2003-09-08','2007-10-26 11:41:40'),(24,6,'2006-12-23','2005-10-07 00:00:00'),(25,51,'2006-10-15','2000-07-15 05:00:34'),(26,4,'2005-04-06','2000-04-03 16:33:32'),(27,7,'2008-04-07',NULL),(28,6,'2006-10-10','2001-04-25 01:26:12'),(29,4,'1900-01-01','2000-12-27 00:00:00');
|
||||
CREATE TABLE t1 (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
`date_nokey` date DEFAULT NULL,
|
||||
@@ -32,29 +32,29 @@ CREATE TABLE `C` (
|
||||
KEY `int_key` (`int_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `C` VALUES (1,2,NULL,'2004-10-11 18:13:16'),(2,9,'2001-09-19',NULL),(3,3,'2004-09-12','1900-01-01 00:00:00'),(4,9,NULL,'2009-07-25 00:00:00'),(5,NULL,'2002-07-19',NULL),(6,9,'2002-12-16','2008-07-27 00:00:00'),(7,3,'2006-02-08','2002-11-13 16:37:31'),(8,8,'2006-08-28','1900-01-01 00:00:00'),(9,8,'2001-04-14','2003-12-10 00:00:00'),(10,53,'2000-01-05','2001-12-21 22:38:22'),(11,0,'2003-12-06','2008-12-13 23:16:44'),(12,5,'1900-01-01','2005-08-15 12:39:41'),(13,166,'2002-11-27',NULL),(14,3,NULL,'2006-09-11 12:06:14'),(15,0,'2003-05-27','2007-12-15 12:39:34'),(16,1,'2005-05-03','2005-08-09 00:00:00'),(17,9,'2001-04-18','2001-09-02 22:50:02'),(18,5,'2005-12-27','2005-12-16 22:58:11'),(19,6,'2004-08-20','2007-04-19 00:19:53'),(20,2,'1900-01-01','1900-01-01 00:00:00');
|
||||
INSERT INTO t1 VALUES (1,2,NULL,'2004-10-11 18:13:16'),(2,9,'2001-09-19',NULL),(3,3,'2004-09-12','1900-01-01 00:00:00'),(4,9,NULL,'2009-07-25 00:00:00'),(5,NULL,'2002-07-19',NULL),(6,9,'2002-12-16','2008-07-27 00:00:00'),(7,3,'2006-02-08','2002-11-13 16:37:31'),(8,8,'2006-08-28','1900-01-01 00:00:00'),(9,8,'2001-04-14','2003-12-10 00:00:00'),(10,53,'2000-01-05','2001-12-21 22:38:22'),(11,0,'2003-12-06','2008-12-13 23:16:44'),(12,5,'1900-01-01','2005-08-15 12:39:41'),(13,166,'2002-11-27',NULL),(14,3,NULL,'2006-09-11 12:06:14'),(15,0,'2003-05-27','2007-12-15 12:39:34'),(16,1,'2005-05-03','2005-08-09 00:00:00'),(17,9,'2001-04-18','2001-09-02 22:50:02'),(18,5,'2005-12-27','2005-12-16 22:58:11'),(19,6,'2004-08-20','2007-04-19 00:19:53'),(20,2,'1900-01-01','1900-01-01 00:00:00');
|
||||
|
||||
SELECT `pk`
|
||||
FROM C OUTR
|
||||
FROM t1 OUTR
|
||||
WHERE `pk` IN (
|
||||
SELECT `int_key`
|
||||
FROM CC
|
||||
FROM t2
|
||||
WHERE `date_nokey` < `datetime_nokey` XOR OUTR .`date_nokey` ) ;
|
||||
|
||||
SELECT `pk`
|
||||
FROM C
|
||||
FROM t1
|
||||
WHERE `pk` IN (
|
||||
SELECT `int_key`
|
||||
FROM CC
|
||||
FROM t2
|
||||
WHERE `date_nokey` < `datetime_nokey` XOR '2009-11-25' ) ;
|
||||
|
||||
DROP TABLE CC;
|
||||
DROP TABLE C;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
#/* End of test case for query 0 */
|
||||
|
||||
#/* Begin test case for query 1 */
|
||||
|
||||
CREATE TABLE `CC` (
|
||||
CREATE TABLE `t2` (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) DEFAULT NULL,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
@@ -66,8 +66,8 @@ CREATE TABLE `CC` (
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `CC` VALUES (10,7,8,NULL,'2002-02-26 06:14:37','2002-02-26 06:14:37'),(11,1,9,'2006-06-14','1900-01-01 00:00:00','1900-01-01 00:00:00'),(12,5,9,'2002-09-12','2006-12-03 09:37:26','2006-12-03 09:37:26'),(13,3,186,'2005-02-15','2008-05-26 12:27:10','2008-05-26 12:27:10'),(14,6,NULL,NULL,'2004-12-14 16:37:30','2004-12-14 16:37:30'),(15,92,2,'2008-11-04','2003-02-11 21:19:41','2003-02-11 21:19:41'),(16,7,3,'2004-09-04','2009-10-18 02:27:49','2009-10-18 02:27:49'),(17,NULL,0,'2006-06-05','2000-09-26 07:45:57','2000-09-26 07:45:57'),(18,3,133,'1900-01-01',NULL,NULL),(19,5,1,'1900-01-01','2005-11-10 12:40:29','2005-11-10 12:40:29'),(20,1,8,'1900-01-01','2009-04-25 00:00:00','2009-04-25 00:00:00'),(21,2,5,'2005-01-13','2002-11-27 00:00:00','2002-11-27 00:00:00'),(22,NULL,5,'2006-05-21','2004-01-26 20:32:32','2004-01-26 20:32:32'),(23,1,8,'2003-09-08','2007-10-26 11:41:40','2007-10-26 11:41:40'),(24,0,6,'2006-12-23','2005-10-07 00:00:00','2005-10-07 00:00:00'),(25,210,51,'2006-10-15','2000-07-15 05:00:34','2000-07-15 05:00:34'),(26,8,4,'2005-04-06','2000-04-03 16:33:32','2000-04-03 16:33:32'),(27,7,7,'2008-04-07',NULL,NULL),(28,5,6,'2006-10-10','2001-04-25 01:26:12','2001-04-25 01:26:12'),(29,NULL,4,'1900-01-01','2000-12-27 00:00:00','2000-12-27 00:00:00');
|
||||
CREATE TABLE `C` (
|
||||
INSERT INTO `t2` VALUES (10,7,8,NULL,'2002-02-26 06:14:37','2002-02-26 06:14:37'),(11,1,9,'2006-06-14','1900-01-01 00:00:00','1900-01-01 00:00:00'),(12,5,9,'2002-09-12','2006-12-03 09:37:26','2006-12-03 09:37:26'),(13,3,186,'2005-02-15','2008-05-26 12:27:10','2008-05-26 12:27:10'),(14,6,NULL,NULL,'2004-12-14 16:37:30','2004-12-14 16:37:30'),(15,92,2,'2008-11-04','2003-02-11 21:19:41','2003-02-11 21:19:41'),(16,7,3,'2004-09-04','2009-10-18 02:27:49','2009-10-18 02:27:49'),(17,NULL,0,'2006-06-05','2000-09-26 07:45:57','2000-09-26 07:45:57'),(18,3,133,'1900-01-01',NULL,NULL),(19,5,1,'1900-01-01','2005-11-10 12:40:29','2005-11-10 12:40:29'),(20,1,8,'1900-01-01','2009-04-25 00:00:00','2009-04-25 00:00:00'),(21,2,5,'2005-01-13','2002-11-27 00:00:00','2002-11-27 00:00:00'),(22,NULL,5,'2006-05-21','2004-01-26 20:32:32','2004-01-26 20:32:32'),(23,1,8,'2003-09-08','2007-10-26 11:41:40','2007-10-26 11:41:40'),(24,0,6,'2006-12-23','2005-10-07 00:00:00','2005-10-07 00:00:00'),(25,210,51,'2006-10-15','2000-07-15 05:00:34','2000-07-15 05:00:34'),(26,8,4,'2005-04-06','2000-04-03 16:33:32','2000-04-03 16:33:32'),(27,7,7,'2008-04-07',NULL,NULL),(28,5,6,'2006-10-10','2001-04-25 01:26:12','2001-04-25 01:26:12'),(29,NULL,4,'1900-01-01','2000-12-27 00:00:00','2000-12-27 00:00:00');
|
||||
CREATE TABLE t1 (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`int_nokey` int(11) DEFAULT NULL,
|
||||
`int_key` int(11) DEFAULT NULL,
|
||||
@@ -79,19 +79,19 @@ CREATE TABLE `C` (
|
||||
KEY `datetime_key` (`datetime_key`),
|
||||
KEY `varchar_key` (`int_key`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
|
||||
INSERT INTO `C` VALUES (1,NULL,2,NULL,'2004-10-11 18:13:16','2004-10-11 18:13:16'),(2,7,9,'2001-09-19',NULL,NULL),(3,9,3,'2004-09-12','1900-01-01 00:00:00','1900-01-01 00:00:00'),(4,7,9,NULL,'2009-07-25 00:00:00','2009-07-25 00:00:00'),(5,4,NULL,'2002-07-19',NULL,NULL),(6,2,9,'2002-12-16','2008-07-27 00:00:00','2008-07-27 00:00:00'),(7,6,3,'2006-02-08','2002-11-13 16:37:31','2002-11-13 16:37:31'),(8,8,8,'2006-08-28','1900-01-01 00:00:00','1900-01-01 00:00:00'),(9,NULL,8,'2001-04-14','2003-12-10 00:00:00','2003-12-10 00:00:00'),(10,5,53,'2000-01-05','2001-12-21 22:38:22','2001-12-21 22:38:22'),(11,NULL,0,'2003-12-06','2008-12-13 23:16:44','2008-12-13 23:16:44'),(12,6,5,'1900-01-01','2005-08-15 12:39:41','2005-08-15 12:39:41'),(13,188,166,'2002-11-27',NULL,NULL),(14,2,3,NULL,'2006-09-11 12:06:14','2006-09-11 12:06:14'),(15,1,0,'2003-05-27','2007-12-15 12:39:34','2007-12-15 12:39:34'),(16,1,1,'2005-05-03','2005-08-09 00:00:00','2005-08-09 00:00:00'),(17,0,9,'2001-04-18','2001-09-02 22:50:02','2001-09-02 22:50:02'),(18,9,5,'2005-12-27','2005-12-16 22:58:11','2005-12-16 22:58:11'),(19,NULL,6,'2004-08-20','2007-04-19 00:19:53','2007-04-19 00:19:53'),(20,4,2,'1900-01-01','1900-01-01 00:00:00','1900-01-01 00:00:00');
|
||||
INSERT INTO t1 VALUES (1,NULL,2,NULL,'2004-10-11 18:13:16','2004-10-11 18:13:16'),(2,7,9,'2001-09-19',NULL,NULL),(3,9,3,'2004-09-12','1900-01-01 00:00:00','1900-01-01 00:00:00'),(4,7,9,NULL,'2009-07-25 00:00:00','2009-07-25 00:00:00'),(5,4,NULL,'2002-07-19',NULL,NULL),(6,2,9,'2002-12-16','2008-07-27 00:00:00','2008-07-27 00:00:00'),(7,6,3,'2006-02-08','2002-11-13 16:37:31','2002-11-13 16:37:31'),(8,8,8,'2006-08-28','1900-01-01 00:00:00','1900-01-01 00:00:00'),(9,NULL,8,'2001-04-14','2003-12-10 00:00:00','2003-12-10 00:00:00'),(10,5,53,'2000-01-05','2001-12-21 22:38:22','2001-12-21 22:38:22'),(11,NULL,0,'2003-12-06','2008-12-13 23:16:44','2008-12-13 23:16:44'),(12,6,5,'1900-01-01','2005-08-15 12:39:41','2005-08-15 12:39:41'),(13,188,166,'2002-11-27',NULL,NULL),(14,2,3,NULL,'2006-09-11 12:06:14','2006-09-11 12:06:14'),(15,1,0,'2003-05-27','2007-12-15 12:39:34','2007-12-15 12:39:34'),(16,1,1,'2005-05-03','2005-08-09 00:00:00','2005-08-09 00:00:00'),(17,0,9,'2001-04-18','2001-09-02 22:50:02','2001-09-02 22:50:02'),(18,9,5,'2005-12-27','2005-12-16 22:58:11','2005-12-16 22:58:11'),(19,NULL,6,'2004-08-20','2007-04-19 00:19:53','2007-04-19 00:19:53'),(20,4,2,'1900-01-01','1900-01-01 00:00:00','1900-01-01 00:00:00');
|
||||
|
||||
SELECT OUTR . `pk` AS X
|
||||
FROM C AS OUTR
|
||||
FROM t1 AS OUTR
|
||||
WHERE OUTR . `pk` IN (
|
||||
SELECT INNR . `int_key` AS Y
|
||||
FROM CC AS INNR
|
||||
FROM t2 AS INNR
|
||||
WHERE INNR . `date_nokey` < INNR . `datetime_nokey` XOR OUTR . `date_nokey` BETWEEN '2004-07-10' AND '2009-11-25'
|
||||
ORDER BY INNR . `int_nokey` ) AND ( OUTR . `datetime_key` BETWEEN '2000-05-25' AND '2004-08-07' OR OUTR . `datetime_nokey` = '2007-10-24' )
|
||||
ORDER BY OUTR . `int_key` , OUTR . `pk`;
|
||||
|
||||
|
||||
DROP TABLE CC;
|
||||
DROP TABLE C;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
#/* End of test case for query 1 */
|
||||
|
||||
|
@@ -8,11 +8,13 @@ partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
|
||||
--sorted_result
|
||||
select hex(a) from t1;
|
||||
select a from t1 where substr(a,1,2)='b\0';
|
||||
update t1 set a='cc' where substr(a,1,2)= 'b\0';
|
||||
select a from t1 where substr(a,1,1)='c';
|
||||
delete from t1 where substr(a,1,2)='cc';
|
||||
--sorted_result
|
||||
select hex(a) from t1;
|
||||
drop table t1;
|
||||
|
||||
@@ -33,6 +35,7 @@ inc $letter;
|
||||
commit;
|
||||
--enable_query_log
|
||||
select count(*) from t2;
|
||||
--sorted_result
|
||||
select hex(a) from t2;
|
||||
drop table t2;
|
||||
|
||||
|
@@ -8,10 +8,12 @@ partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
|
||||
--sorted_result
|
||||
select * from t1;
|
||||
select * from t1 where a='b';
|
||||
update t1 set a='bb' where a='b';
|
||||
delete from t1 where a='bb';
|
||||
--sorted_result
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
@@ -32,6 +34,7 @@ inc $letter;
|
||||
commit;
|
||||
--enable_query_log
|
||||
select count(*) from t2;
|
||||
--sorted_result
|
||||
select * from t2;
|
||||
drop table t2;
|
||||
|
||||
|
@@ -8,11 +8,13 @@ partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
insert into t1 values ('A'),('D'),('L'),('G');
|
||||
--sorted_result
|
||||
select * from t1;
|
||||
select * from t1 where a='A';
|
||||
update t1 set a='E' where a='L';
|
||||
select * from t1;
|
||||
delete from t1 where a='E';
|
||||
--sorted_result
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
@@ -37,6 +39,7 @@ commit;
|
||||
--enable_query_log
|
||||
insert into t2 values ('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'),('0');
|
||||
select count(*) from t2;
|
||||
--sorted_result
|
||||
select * from t2;
|
||||
drop table t2;
|
||||
|
||||
|
@@ -8,10 +8,12 @@ partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
|
||||
--sorted_result
|
||||
select * from t1;
|
||||
select * from t1 where a='b';
|
||||
update t1 set a='bb' where a='b';
|
||||
delete from t1 where a='bb';
|
||||
--sorted_result
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
@@ -32,6 +34,7 @@ inc $letter;
|
||||
commit;
|
||||
--enable_query_log
|
||||
select count(*) from t2;
|
||||
--sorted_result
|
||||
select * from t2;
|
||||
drop table t2;
|
||||
|
||||
|
@@ -8,10 +8,12 @@ partition pa3 max_rows=30 min_rows=4,
|
||||
partition pa4 max_rows=40 min_rows=2);
|
||||
show create table t1;
|
||||
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
|
||||
--sorted_result
|
||||
select * from t1;
|
||||
select * from t1 where a='b';
|
||||
update t1 set a='bb' where a='b';
|
||||
delete from t1 where a='bb';
|
||||
--sorted_result
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
@@ -32,6 +34,7 @@ inc $letter;
|
||||
commit;
|
||||
--enable_query_log
|
||||
select count(*) from t2;
|
||||
--sorted_result
|
||||
select * from t2;
|
||||
drop table t2;
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
4
mysql-test/suite/perfschema/include/have_timer_cycle.inc
Normal file
4
mysql-test/suite/perfschema/include/have_timer_cycle.inc
Normal file
@@ -0,0 +1,4 @@
|
||||
if (!`SELECT count(*) FROM performance_schema.performance_timers WHERE timer_name='CYCLE' AND timer_frequency IS NOT NULL`)
|
||||
{
|
||||
Skip Need performance timer CYCLE;
|
||||
}
|
@@ -107,3 +107,14 @@ select mysql_errno, returned_sqlstate, message_text, errors, warnings from
|
||||
performance_schema.events_statements_history_long where errors > 0;
|
||||
mysql_errno returned_sqlstate message_text errors warnings
|
||||
1146 42S02 Table 'test.t1' doesn't exist 1 0
|
||||
use performance_schema;
|
||||
truncate performance_schema.events_statements_history;
|
||||
select 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' AS A;
|
||||
A
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
select _utf8mb4 'ваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑ' as B;
|
||||
B
|
||||
вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>вас<EFBFBD>
|
||||
select count(*) from events_statements_history where sql_text like "%...";
|
||||
count(*)
|
||||
2
|
||||
|
@@ -554,7 +554,7 @@ ERROR 42000: DROP command denied to user 'pfs_user_4'@'localhost' for table 'eve
|
||||
#
|
||||
# Grant access to change tables with the root account
|
||||
GRANT UPDATE ON performance_schema.setup_consumers TO pfs_user_4;
|
||||
GRANT UPDATE ON performance_schema.setup_timers TO pfs_user_4;
|
||||
GRANT UPDATE, SELECT ON performance_schema.setup_timers TO pfs_user_4;
|
||||
GRANT UPDATE, SELECT ON performance_schema.setup_instruments TO pfs_user_4;
|
||||
GRANT DROP ON performance_schema.events_waits_current TO pfs_user_4;
|
||||
GRANT DROP ON performance_schema.events_waits_history TO pfs_user_4;
|
||||
@@ -565,7 +565,7 @@ UPDATE performance_schema.setup_instruments SET enabled = 'YES'
|
||||
WHERE name LIKE 'wait/synch/mutex/%'
|
||||
OR name LIKE 'wait/synch/rwlock/%';
|
||||
UPDATE performance_schema.setup_consumers SET enabled = 'YES';
|
||||
UPDATE performance_schema.setup_timers SET timer_name = 'TICK';
|
||||
UPDATE performance_schema.setup_timers SET timer_name = 'TICK' WHERE name <> "wait";
|
||||
TRUNCATE TABLE performance_schema.events_waits_history_long;
|
||||
TRUNCATE TABLE performance_schema.events_waits_history;
|
||||
TRUNCATE TABLE performance_schema.events_waits_current;
|
||||
@@ -576,6 +576,5 @@ flush privileges;
|
||||
UPDATE performance_schema.setup_instruments SET enabled = 'YES', timed = 'YES';
|
||||
UPDATE performance_schema.setup_consumers SET enabled = 'YES';
|
||||
UPDATE performance_schema.setup_timers SET timer_name = 'MICROSECOND' where name="idle";
|
||||
UPDATE performance_schema.setup_timers SET timer_name = 'CYCLE' where name="wait";
|
||||
UPDATE performance_schema.setup_timers SET timer_name = 'NANOSECOND' where name="stage";
|
||||
UPDATE performance_schema.setup_timers SET timer_name = 'NANOSECOND' where name="statement";
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user