mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '10.0' into 10.1
This commit is contained in:
52
.gitignore
vendored
52
.gitignore
vendored
@ -166,32 +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/tdb_logprint
|
||||
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
|
||||
|
@ -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, " ");
|
||||
}
|
||||
|
||||
@ -580,8 +585,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",
|
||||
@ -773,8 +777,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" : "",
|
||||
@ -834,8 +837,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",
|
||||
@ -859,8 +861,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",
|
||||
@ -1084,12 +1085,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);
|
||||
|
@ -1536,6 +1536,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;
|
||||
@ -1722,7 +1724,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;
|
||||
if (start_position > UINT_MAX32 && remote_opt)
|
||||
{
|
||||
@ -2056,6 +2058,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);
|
||||
}
|
||||
/*
|
||||
@ -2064,6 +2067,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
|
||||
@ -2094,7 +2098,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)
|
||||
@ -2462,23 +2468,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)
|
||||
@ -2498,12 +2504,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
|
||||
@ -2573,12 +2585,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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -43,7 +43,7 @@ static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0,
|
||||
opt_silent = 0, opt_auto_repair = 0, ignore_errors = 0,
|
||||
tty_password= 0, opt_frm= 0, debug_info_flag= 0, debug_check_flag= 0,
|
||||
opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0,
|
||||
opt_do_tables= 1;
|
||||
opt_persistent_all= 0, opt_do_tables= 1;
|
||||
static my_bool opt_write_binlog= 1, opt_flush_tables= 0;
|
||||
static uint verbose = 0, opt_mysql_port=0;
|
||||
static int my_end_arg;
|
||||
@ -160,6 +160,10 @@ static struct my_option my_long_options[] =
|
||||
{"password", 'p',
|
||||
"Password to use when connecting to server. If password is not given, it's solicited on the tty.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"persistent", 'Z',
|
||||
"When using ANALYZE TABLE use the PERSISTENT FOR ALL option.",
|
||||
&opt_persistent_all, &opt_persistent_all, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
#ifdef __WIN__
|
||||
{"pipe", 'W', "Use named pipes to connect to server.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -910,6 +914,7 @@ static int handle_request_for_tables(char *tables, size_t length, my_bool view)
|
||||
case DO_ANALYZE:
|
||||
DBUG_ASSERT(!view);
|
||||
op= (opt_write_binlog) ? "ANALYZE" : "ANALYZE NO_WRITE_TO_BINLOG";
|
||||
if (opt_persistent_all) end = strmov(end, " PERSISTENT FOR ALL");
|
||||
break;
|
||||
case DO_OPTIMIZE:
|
||||
DBUG_ASSERT(!view);
|
||||
|
@ -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;
|
||||
@ -1144,16 +1150,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"))
|
||||
@ -1591,14 +1595,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();
|
||||
@ -1615,8 +1631,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);
|
||||
}
|
||||
@ -1709,6 +1723,7 @@ static void dbDisconnect(char *host)
|
||||
{
|
||||
verbose_msg("-- Disconnecting from %s...\n", host ? host : "localhost");
|
||||
mysql_close(mysql);
|
||||
mysql= 0;
|
||||
} /* dbDisconnect */
|
||||
|
||||
|
||||
@ -2350,6 +2365,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);
|
||||
|
||||
@ -2434,7 +2451,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];
|
||||
@ -2458,7 +2474,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"))
|
||||
@ -2489,7 +2505,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)))
|
||||
{
|
||||
@ -2507,7 +2527,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]))
|
||||
{
|
||||
@ -2527,9 +2548,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);
|
||||
}
|
||||
|
||||
@ -2574,18 +2598,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)
|
||||
@ -2708,13 +2739,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);
|
||||
}
|
||||
|
||||
@ -3286,10 +3324,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);
|
||||
@ -3301,12 +3335,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, ";");
|
||||
|
||||
@ -3315,8 +3355,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);
|
||||
@ -3409,11 +3447,12 @@ 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;
|
||||
}
|
||||
|
||||
}
|
||||
@ -3662,12 +3701,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;
|
||||
}
|
||||
}
|
||||
@ -3693,6 +3734,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)
|
||||
@ -3702,6 +3745,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;
|
||||
}
|
||||
@ -3711,6 +3755,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;
|
||||
}
|
||||
@ -4026,23 +4071,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 */
|
||||
@ -4059,46 +4103,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"
|
||||
@ -4109,16 +4151,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;
|
||||
}
|
||||
|
||||
@ -4526,9 +4568,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)
|
||||
{
|
||||
@ -4542,7 +4587,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)))
|
||||
{
|
||||
@ -4839,7 +4886,6 @@ 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;
|
||||
int lower_case_table_names;
|
||||
DBUG_ENTER("dump_selected_tables");
|
||||
@ -4847,8 +4893,9 @@ static int dump_selected_tables(char *db, char **table_names, int 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.");
|
||||
|
||||
/* Figure out how to compare table names. */
|
||||
@ -4859,7 +4906,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
{
|
||||
/* the table name passed on commandline may be wrong case */
|
||||
if ((*pos= get_actual_table_name(*table_names, lower_case_table_names,
|
||||
&root)))
|
||||
&glob_root)))
|
||||
{
|
||||
/* Add found table name to lock_tables_query */
|
||||
if (lock_tables)
|
||||
@ -4874,7 +4921,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 */
|
||||
@ -4895,7 +4942,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 */
|
||||
@ -4907,7 +4954,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 */
|
||||
@ -4921,7 +4968,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 */
|
||||
@ -4936,6 +4986,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);
|
||||
}
|
||||
}
|
||||
@ -4954,7 +5006,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4962,8 +5018,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 */
|
||||
@ -4983,9 +5041,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();
|
||||
|
||||
|
@ -32,7 +32,7 @@ SET(CPACK_RPM_PACKAGE_NAME ${CPACK_PACKAGE_NAME})
|
||||
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")
|
||||
|
@ -55,6 +55,7 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
|
||||
SET(SSL_INCLUDE_DIRS ${INC_DIRS})
|
||||
SET(SSL_INTERNAL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)
|
||||
SET(SSL_DEFINES "-DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED")
|
||||
SET(HAVE_ERR_remove_thread_state OFF CACHE INTERNAL "yassl doesn't have ERR_remove_thread_state")
|
||||
SET(HAVE_EncryptAes128Ctr OFF CACHE INTERNAL "yassl doesn't support AES-CTR")
|
||||
SET(HAVE_EncryptAes128Gcm OFF CACHE INTERNAL "yassl doesn't support AES-GCM")
|
||||
CHANGE_SSL_SETTINGS("bundled")
|
||||
@ -197,6 +198,8 @@ MACRO (MYSQL_CHECK_SSL)
|
||||
SET(SSL_DEFINES "-DHAVE_OPENSSL")
|
||||
|
||||
SET(CMAKE_REQUIRED_LIBRARIES ${SSL_LIBRARIES})
|
||||
CHECK_SYMBOL_EXISTS(ERR_remove_thread_state "openssl/err.h"
|
||||
HAVE_ERR_remove_thread_state)
|
||||
CHECK_SYMBOL_EXISTS(EVP_aes_128_ctr "openssl/evp.h"
|
||||
HAVE_EncryptAes128Ctr)
|
||||
CHECK_SYMBOL_EXISTS(EVP_aes_128_gcm "openssl/evp.h"
|
||||
|
@ -414,6 +414,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__
|
||||
@ -473,7 +474,7 @@
|
||||
#cmakedefine HAVE_BSD_SIGNALS 1
|
||||
#cmakedefine HAVE_SVR3_SIGNALS 1
|
||||
#cmakedefine HAVE_V7_SIGNALS 1
|
||||
|
||||
#cmakedefine HAVE_ERR_remove_thread_state 1
|
||||
|
||||
#cmakedefine HAVE_SOLARIS_STYLE_GETHOST 1
|
||||
|
||||
|
@ -555,6 +555,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)
|
||||
|
1
debian/autobake-deb.sh
vendored
1
debian/autobake-deb.sh
vendored
@ -44,7 +44,6 @@ else
|
||||
sed -i -e "s/\\\${MAYBE_LIBCRACK}/${MAYBE_LIBCRACK}/g" debian/control
|
||||
fi
|
||||
|
||||
|
||||
# Adjust changelog, add new version.
|
||||
#
|
||||
echo "Incrementing changelog and starting build scripts"
|
||||
|
@ -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.
|
||||
Copyright (c) 2014, 2015, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -663,8 +663,8 @@ int main(int argc, char **argv)
|
||||
{
|
||||
FILE* f; /* our input file */
|
||||
char* filename; /* our input filename. */
|
||||
unsigned char *big_buf, *buf;
|
||||
unsigned char *big_xdes, *xdes;
|
||||
unsigned char *big_buf= 0, *buf;
|
||||
unsigned char *big_xdes= 0, *xdes;
|
||||
ulong bytes; /* bytes read count */
|
||||
ulint ct; /* current page number (0 based) */
|
||||
time_t now; /* current time */
|
||||
@ -694,14 +694,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;
|
||||
|
||||
@ -711,7 +711,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);
|
||||
@ -719,7 +719,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 */
|
||||
@ -740,10 +740,7 @@ int main(int argc, char **argv)
|
||||
|
||||
|
||||
if (!get_page_size(f, buf, &logical_page_size, &physical_page_size))
|
||||
{
|
||||
free(big_buf);
|
||||
return 1;
|
||||
}
|
||||
goto error;
|
||||
|
||||
if (compressed)
|
||||
{
|
||||
@ -763,8 +760,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)
|
||||
{
|
||||
@ -790,9 +786,7 @@ int main(int argc, char **argv)
|
||||
if (!fd)
|
||||
{
|
||||
perror("Error; Unable to obtain file descriptor number");
|
||||
free(big_buf);
|
||||
free(big_xdes);
|
||||
return 1;
|
||||
goto error;
|
||||
}
|
||||
|
||||
offset= (off_t)start_page * (off_t)physical_page_size;
|
||||
@ -800,9 +794,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);
|
||||
free(big_xdes);
|
||||
return 1;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
@ -816,20 +808,13 @@ int main(int argc, char **argv)
|
||||
bytes= fread(buf, 1, physical_page_size, f);
|
||||
|
||||
if (!bytes && feof(f))
|
||||
{
|
||||
print_stats();
|
||||
free(big_buf);
|
||||
free(big_xdes);
|
||||
return 0;
|
||||
}
|
||||
goto ok;
|
||||
|
||||
if (ferror(f))
|
||||
{
|
||||
fprintf(stderr, "Error reading %lu bytes", physical_page_size);
|
||||
perror(" ");
|
||||
free(big_buf);
|
||||
free(big_xdes);
|
||||
return 1;
|
||||
goto error;
|
||||
}
|
||||
|
||||
ulint page_type = mach_read_from_2(buf+FIL_PAGE_TYPE);
|
||||
@ -883,11 +868,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);
|
||||
free(big_xdes);
|
||||
return 1;
|
||||
}
|
||||
goto error;
|
||||
page_ok = 0;
|
||||
}
|
||||
}
|
||||
@ -918,11 +899,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);
|
||||
free(big_xdes);
|
||||
return 1;
|
||||
}
|
||||
goto error;
|
||||
page_ok = 0;
|
||||
}
|
||||
|
||||
@ -935,11 +912,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);
|
||||
free(big_xdes);
|
||||
return 1;
|
||||
}
|
||||
goto error;
|
||||
page_ok = 0;
|
||||
}
|
||||
}
|
||||
@ -959,22 +932,13 @@ 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);
|
||||
free(big_xdes);
|
||||
return 1;
|
||||
}
|
||||
goto error;
|
||||
page_ok = 0;
|
||||
}
|
||||
}
|
||||
/* end if this was the last page we were supposed to check */
|
||||
if (use_end_page && (ct >= end_page))
|
||||
{
|
||||
print_stats();
|
||||
free(big_buf);
|
||||
free(big_xdes);
|
||||
return 0;
|
||||
}
|
||||
goto ok;
|
||||
|
||||
if (per_page_details)
|
||||
{
|
||||
@ -1013,8 +977,18 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
}
|
||||
print_stats();
|
||||
free(big_buf);
|
||||
|
||||
ok:
|
||||
if (!just_count)
|
||||
print_stats();
|
||||
free(big_xdes);
|
||||
return 0;
|
||||
free(big_buf);
|
||||
my_end(0);
|
||||
exit(0);
|
||||
|
||||
error:
|
||||
free(big_xdes);
|
||||
free(big_buf);
|
||||
my_end(0);
|
||||
exit(1);
|
||||
}
|
||||
|
@ -547,7 +547,11 @@ typedef int my_socket; /* File descriptor for sockets */
|
||||
/* Type for fuctions that handles signals */
|
||||
#define sig_handler RETSIGTYPE
|
||||
C_MODE_START
|
||||
typedef void (*sig_return)(); /* Returns type from signal */
|
||||
#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 */
|
||||
|
@ -267,8 +267,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
|
||||
{
|
||||
|
@ -146,6 +146,10 @@ typedef my_socket YASSL_SOCKET_T;
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
#ifdef HAVE_ERR_remove_thread_state
|
||||
#define ERR_remove_state(X) ERR_remove_thread_state(NULL)
|
||||
#endif
|
||||
|
||||
enum enum_ssl_init_error
|
||||
{
|
||||
SSL_INITERR_NOERROR= 0, SSL_INITERR_CERT, SSL_INITERR_KEY,
|
||||
|
@ -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);
|
||||
|
@ -677,6 +677,22 @@ Specifying a password on the command line should be considered insecure\&. You c
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
.\" mysqlcheck: persisent option
|
||||
.\" persistent option: mysql
|
||||
\fB\-\-persistent\fR,
|
||||
\fB\-Z\fR
|
||||
.sp
|
||||
Used with ANALYZE TABLE to append the option PERSISENT FOR ALL.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
.\" mysqlcheck: pipe option
|
||||
.\" pipe option: mysql
|
||||
\fB\-\-pipe\fR,
|
||||
|
@ -1291,7 +1291,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
|
||||
|
@ -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
|
||||
|
@ -13,7 +13,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
|
||||
}
|
||||
|
||||
|
||||
|
@ -274,6 +274,7 @@ if (IS_WINDOWS)
|
||||
#
|
||||
my @client_rules=
|
||||
(
|
||||
{ 'character-sets-dir' => \&fix_charset_dir },
|
||||
);
|
||||
|
||||
|
||||
@ -296,7 +297,6 @@ my @mysqltest_rules=
|
||||
#
|
||||
my @mysqlbinlog_rules=
|
||||
(
|
||||
{ 'character-sets-dir' => \&fix_charset_dir },
|
||||
);
|
||||
|
||||
|
||||
|
@ -5993,10 +5993,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
|
||||
@ -6126,7 +6126,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
|
||||
@ -6173,7 +6173,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.
|
||||
parallel=N Run tests in N parallel threads (default 1)
|
||||
Use parallel=auto for auto-setting of N
|
||||
@ -6207,7 +6207,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.
|
||||
|
@ -1883,5 +1883,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,6 +11,9 @@ 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
|
||||
#
|
||||
# MDEV-7677 my_charset_handler_filename has a wrong "ismbchar" member
|
||||
#
|
||||
|
@ -6155,6 +6155,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,
|
||||
`c1` varchar(19) CHARACTER SET utf8 NOT NULL,
|
||||
`c2` varchar(19) CHARACTER SET utf8 NOT NULL,
|
||||
`c3` varchar(19) CHARACTER SET utf8 NOT NULL,
|
||||
`c4` varchar(19) CHARACTER SET utf8 NOT NULL
|
||||
) 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
|
||||
#
|
||||
|
@ -115,8 +115,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');
|
||||
|
@ -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.
|
||||
|
||||
|
@ -46,7 +46,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
|
||||
@ -394,6 +394,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
|
||||
#
|
||||
|
@ -347,6 +347,9 @@ CREATE TABLE test.`t.1` (id int);
|
||||
mysqlcheck test t.1
|
||||
test.t.1 OK
|
||||
drop table test.`t.1`;
|
||||
#
|
||||
# MDEV-8123 mysqlcheck: new --process-views option conflicts with --quick, --extended and such
|
||||
#
|
||||
create view v1 as select 1;
|
||||
mysqlcheck --process-views test
|
||||
test.v1 OK
|
||||
@ -361,6 +364,9 @@ test.v1 OK
|
||||
mysqlcheck --process-views --check-upgrade test
|
||||
test.v1 OK
|
||||
drop view v1;
|
||||
#
|
||||
# MDEV-8124 mysqlcheck: --auto-repair runs REPAIR TABLE instead of REPAIR VIEW on views
|
||||
#
|
||||
create table t1(a int);
|
||||
mysqlcheck --process-views --check-upgrade --auto-repair test
|
||||
test.t1 OK
|
||||
@ -370,3 +376,16 @@ Repairing views
|
||||
test.v1 OK
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
#
|
||||
#MDEV-7384 [PATCH] add PERSISENT FOR ALL option to mysqlanalyze/mysqlcheck
|
||||
#
|
||||
create table t1(a int);
|
||||
insert into t1 (a) values (1), (2), (3);
|
||||
select * from mysql.column_stats;
|
||||
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency hist_size hist_type histogram
|
||||
test.t1 Engine-independent statistics collected
|
||||
status : OK
|
||||
select * from mysql.column_stats where db_name = 'test' 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
|
||||
test t1 a 1 3 0.0000 4.0000 1.0000 0 NULL NULL
|
||||
drop table t1;
|
||||
|
@ -5320,6 +5320,33 @@ 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`;
|
||||
use test;
|
||||
#
|
||||
# Test mysqldump with --disable-query-logs
|
||||
#
|
||||
create table t1 (a int);
|
||||
|
@ -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;
|
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;
|
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;
|
||||
|
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`;
|
@ -567,7 +567,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
|
||||
@ -641,6 +641,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` (
|
||||
@ -648,7 +660,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;
|
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`;
|
@ -349,7 +349,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;
|
||||
@ -401,6 +401,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.
@ -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
|
||||
|
@ -4,6 +4,7 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/no_protocol.inc
|
||||
|
||||
#
|
||||
# Bug#12790483 OBJECTS_SUMMARY_GLOBAL_BY_TYPE AND RENAME TABLE
|
||||
@ -189,3 +190,20 @@ select mysql_errno, returned_sqlstate, message_text, errors, warnings
|
||||
--echo
|
||||
select mysql_errno, returned_sqlstate, message_text, errors, warnings from
|
||||
performance_schema.events_statements_history_long where errors > 0;
|
||||
|
||||
#
|
||||
# Bug#20519832 - TRUNCATED SQL_TEXT values are not suffixed with '...'
|
||||
#
|
||||
# Verify that truncated SQL statements are suffixed with '...'
|
||||
|
||||
use performance_schema;
|
||||
truncate performance_schema.events_statements_history;
|
||||
|
||||
# Should truncate at 1024 bytes (1024 characters)
|
||||
select 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' AS A;
|
||||
|
||||
# Should truncate at 1024 bytes (487 characters)
|
||||
|
||||
select _utf8mb4 'ваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑваÑÑ' as B;
|
||||
|
||||
select count(*) from events_statements_history where sql_text like "%...";
|
||||
|
@ -1,9 +1,8 @@
|
||||
install soname 'auth_0x0100';
|
||||
select plugin_name, plugin_type_version from information_schema.plugins where plugin_type='authentication' order by plugin_name;
|
||||
select plugin_name, plugin_type_version from information_schema.plugins where
|
||||
plugin_type='authentication' and plugin_library is not null order by plugin_name;
|
||||
plugin_name plugin_type_version
|
||||
auth_0x0100 1.0
|
||||
mysql_native_password 2.0
|
||||
mysql_old_password 2.0
|
||||
create user tt identified via auth_0x0100;
|
||||
create user zzzzzzzzzzzzzzzz;
|
||||
grant select on test.* to zzzzzzzzzzzzzzzz;
|
||||
|
@ -6,7 +6,8 @@ if (!$AUTH_0X0100_SO) {
|
||||
|
||||
install soname 'auth_0x0100';
|
||||
|
||||
select plugin_name, plugin_type_version from information_schema.plugins where plugin_type='authentication' order by plugin_name;
|
||||
select plugin_name, plugin_type_version from information_schema.plugins where
|
||||
plugin_type='authentication' and plugin_library is not null order by plugin_name;
|
||||
|
||||
create user tt identified via auth_0x0100;
|
||||
create user zzzzzzzzzzzzzzzz;
|
||||
|
@ -7,7 +7,8 @@ CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=InnoDB;
|
||||
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;
|
||||
name age id
|
||||
Andy 31 00000001
|
||||
|
@ -7,7 +7,8 @@ CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=MyISAM;
|
||||
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;
|
||||
name age id
|
||||
Andy 31 00000001
|
||||
|
@ -493,13 +493,13 @@ include/diff_tables.inc [master:t4, slave:t4]
|
||||
[expecting slave to stop]
|
||||
INSERT INTO t5 VALUES (1, "", 1);
|
||||
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
include/wait_for_slave_sql_error.inc [errno=1677 ]
|
||||
include/wait_for_slave_sql_error.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)''
|
||||
include/rpl_reset.inc
|
||||
[expecting slave to stop]
|
||||
INSERT INTO t6 VALUES (1, "", 1);
|
||||
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
include/wait_for_slave_sql_error.inc [errno=1677 ]
|
||||
include/wait_for_slave_sql_error.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)''
|
||||
include/rpl_reset.inc
|
||||
[expecting slave to replicate correctly]
|
||||
|
@ -496,13 +496,13 @@ include/diff_tables.inc [master:t4, slave:t4]
|
||||
[expecting slave to stop]
|
||||
INSERT INTO t5 VALUES (1, "", 1);
|
||||
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
include/wait_for_slave_sql_error.inc [errno=1677 ]
|
||||
include/wait_for_slave_sql_error.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)''
|
||||
include/rpl_reset.inc
|
||||
[expecting slave to stop]
|
||||
INSERT INTO t6 VALUES (1, "", 1);
|
||||
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
|
||||
include/wait_for_slave_sql_error.inc [errno=1677 ]
|
||||
include/wait_for_slave_sql_error.inc [errno=1677]
|
||||
Last_SQL_Error = 'Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)''
|
||||
include/rpl_reset.inc
|
||||
[expecting slave to replicate correctly]
|
||||
|
@ -25,10 +25,4 @@ INSERT INTO t1(c1) VALUES (NULL);
|
||||
UPDATE t1 SET c1= 0;
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
DROP TABLE t1;
|
||||
include/rpl_reset.inc
|
||||
CREATE TABLE t1 (c1 int(11) NOT NULL, c2 int(11) NOT NULL, c3 int(11) DEFAULT '-1') ENGINE=InnoDB 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);
|
||||
include/diff_tables.inc [master:test.t1, slave:test.t1]
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
|
@ -34,10 +34,4 @@ INSERT INTO t1(c1) VALUES (NULL);
|
||||
UPDATE t1 SET c1= 0;
|
||||
include/diff_tables.inc [master:t1, slave:t1]
|
||||
DROP TABLE t1;
|
||||
include/rpl_reset.inc
|
||||
CREATE TABLE t1 (c1 int(11) NOT NULL, c2 int(11) NOT NULL, c3 int(11) DEFAULT '-1') ENGINE=MyISAM 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);
|
||||
include/diff_tables.inc [master:test.t1, slave:test.t1]
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
|
@ -8,4 +8,6 @@ set @time_after_kill := (select CURRENT_TIMESTAMP);
|
||||
[Time after the query]
|
||||
[Killing of the slave IO thread was successful]
|
||||
START SLAVE IO_THREAD;
|
||||
create table t1 (a int primary key);
|
||||
drop table t1;
|
||||
include/rpl_end.inc
|
||||
|
@ -3,6 +3,7 @@
|
||||
# tables. Specifically when drop temporary tables and create temporary tables
|
||||
# are used.
|
||||
###################################################################################
|
||||
--source include/big_test.inc
|
||||
--source include/have_binlog_format_mixed.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/master-slave.inc
|
||||
|
@ -53,5 +53,12 @@ if(`select TIMESTAMPDIFF(SECOND,@time_after_kill, @time_before_kill) > 60`)
|
||||
|
||||
START SLAVE IO_THREAD;
|
||||
|
||||
# Ensure that the slave io thread started properly
|
||||
connection master;
|
||||
create table t1 (a int primary key);
|
||||
sync_slave_with_master;
|
||||
connection master;
|
||||
drop table t1;
|
||||
|
||||
# End of test
|
||||
--source include/rpl_end.inc
|
||||
|
@ -3,6 +3,7 @@
|
||||
# tables. Specifically when drop temporary tables and create temporary tables
|
||||
# are used.
|
||||
###################################################################################
|
||||
--source include/big_test.inc
|
||||
--source include/have_binlog_format_statement.inc
|
||||
--source include/master-slave.inc
|
||||
--source include/have_innodb.inc
|
||||
|
@ -27,5 +27,7 @@ reset slave;
|
||||
set global rpl_semi_sync_slave_enabled = OFF;
|
||||
--connection master
|
||||
drop table t1;
|
||||
--sync_slave_with_master
|
||||
--connection master
|
||||
set global rpl_semi_sync_master_enabled = OFF;
|
||||
--source include/rpl_end.inc
|
||||
|
@ -10,11 +10,5 @@ there should be *no* long test name listed below:
|
||||
select distinct variable_name as `there should be *no* variables listed below:` from t2
|
||||
left join t1 on variable_name=test_name where test_name is null;
|
||||
there should be *no* variables listed below:
|
||||
encrypt_tmp_files
|
||||
innodb_default_encryption_key_id
|
||||
max_digest_length
|
||||
strict_password_validation
|
||||
wsrep_patch_version
|
||||
pfs_max_digest_length
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
|
23
mysql-test/suite/sys_vars/r/max_digest_length_basic.result
Normal file
23
mysql-test/suite/sys_vars/r/max_digest_length_basic.result
Normal file
@ -0,0 +1,23 @@
|
||||
select @@global.max_digest_length;
|
||||
@@global.max_digest_length
|
||||
1024
|
||||
select @@session.max_digest_length;
|
||||
ERROR HY000: Variable 'max_digest_length' is a GLOBAL variable
|
||||
show global variables like 'max_digest_length';
|
||||
Variable_name Value
|
||||
max_digest_length 1024
|
||||
show session variables like 'max_digest_length';
|
||||
Variable_name Value
|
||||
max_digest_length 1024
|
||||
select * from information_schema.global_variables
|
||||
where variable_name='max_digest_length';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_DIGEST_LENGTH 1024
|
||||
select * from information_schema.session_variables
|
||||
where variable_name='max_digest_length';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
MAX_DIGEST_LENGTH 1024
|
||||
set global max_digest_length=1;
|
||||
ERROR HY000: Variable 'max_digest_length' is a read only variable
|
||||
set session max_digest_length=1;
|
||||
ERROR HY000: Variable 'max_digest_length' is a read only variable
|
@ -0,0 +1,23 @@
|
||||
select @@global.performance_schema_max_digest_length;
|
||||
@@global.performance_schema_max_digest_length
|
||||
1024
|
||||
select @@session.performance_schema_max_digest_length;
|
||||
ERROR HY000: Variable 'performance_schema_max_digest_length' is a GLOBAL variable
|
||||
show global variables like 'performance_schema_max_digest_length';
|
||||
Variable_name Value
|
||||
performance_schema_max_digest_length 1024
|
||||
show session variables like 'performance_schema_max_digest_length';
|
||||
Variable_name Value
|
||||
performance_schema_max_digest_length 1024
|
||||
select * from information_schema.global_variables
|
||||
where variable_name='performance_schema_max_digest_length';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH 1024
|
||||
select * from information_schema.session_variables
|
||||
where variable_name='performance_schema_max_digest_length';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
PERFORMANCE_SCHEMA_MAX_DIGEST_LENGTH 1024
|
||||
set global performance_schema_max_digest_length=1;
|
||||
ERROR HY000: Variable 'performance_schema_max_digest_length' is a read only variable
|
||||
set session performance_schema_max_digest_length=1;
|
||||
ERROR HY000: Variable 'performance_schema_max_digest_length' is a read only variable
|
@ -21,7 +21,7 @@
|
||||
VARIABLE_NAME INNODB_ADAPTIVE_MAX_SLEEP_DELAY
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 150000
|
||||
@@ -341,6 +355,20 @@
|
||||
@@ -355,6 +369,20 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
@ -32,7 +32,7 @@
|
||||
+DEFAULT_VALUE OFF
|
||||
+VARIABLE_SCOPE GLOBAL
|
||||
+VARIABLE_TYPE BOOLEAN
|
||||
+VARIABLE_COMMENT Preallocate (pre-fault) the page frames required for the mapping established by the buffer pool memory region. Disabled by default.
|
||||
+VARIABLE_COMMENT Depricated. This option is temporary alias of --innodb-numa-interleave.
|
||||
+NUMERIC_MIN_VALUE NULL
|
||||
+NUMERIC_MAX_VALUE NULL
|
||||
+NUMERIC_BLOCK_SIZE NULL
|
||||
@ -42,7 +42,7 @@
|
||||
VARIABLE_NAME INNODB_BUFFER_POOL_SIZE
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 8388608
|
||||
@@ -432,7 +460,7 @@
|
||||
@@ -446,7 +474,7 @@
|
||||
DEFAULT_VALUE ON
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE BOOLEAN
|
||||
@ -51,7 +51,7 @@
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
@@ -453,6 +481,104 @@
|
||||
@@ -467,6 +495,104 @@
|
||||
ENUM_VALUE_LIST CRC32,STRICT_CRC32,INNODB,STRICT_INNODB,NONE,STRICT_NONE
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
@ -156,7 +156,7 @@
|
||||
VARIABLE_NAME INNODB_CMP_PER_INDEX_ENABLED
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE OFF
|
||||
@@ -551,6 +677,20 @@
|
||||
@@ -565,6 +691,20 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
@ -177,7 +177,7 @@
|
||||
VARIABLE_NAME INNODB_DATA_FILE_PATH
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE ibdata1:12M:autoextend
|
||||
@@ -747,6 +887,20 @@
|
||||
@@ -761,6 +901,20 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
@ -198,7 +198,7 @@
|
||||
VARIABLE_NAME INNODB_ENCRYPTION_ROTATE_KEY_AGE
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 1
|
||||
@@ -817,6 +971,20 @@
|
||||
@@ -831,6 +985,20 @@
|
||||
ENUM_VALUE_LIST OFF,ON,FORCE
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
@ -219,7 +219,7 @@
|
||||
VARIABLE_NAME INNODB_FAST_SHUTDOWN
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 1
|
||||
@@ -944,11 +1112,11 @@
|
||||
@@ -958,11 +1126,11 @@
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME INNODB_FLUSH_LOG_AT_TRX_COMMIT
|
||||
@ -233,7 +233,7 @@
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Controls the durability/speed trade-off for commits. Set to 0 (write and flush redo log to disk only once per second), 1 (flush to disk at each commit), 2 (write to log at commit but flush to disk only once per second) or 3 (flush to disk at prepare and at commit, slower and usually redundant). 1 and 3 guarantees that after a crash, committed transactions will not be lost and will be consistent with the binlog and other transactional engines. 2 can get inconsistent and lose transactions if there is a power failure or kernel crash but not if mysqld crashes. 0 has no guarantees in case of crash. 0 and 2 can be faster than 1 or 3.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
@@ -1041,6 +1209,20 @@
|
||||
@@ -1055,6 +1223,20 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
@ -254,7 +254,7 @@
|
||||
VARIABLE_NAME INNODB_FT_AUX_TABLE
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE
|
||||
@@ -1279,6 +1461,20 @@
|
||||
@@ -1293,6 +1475,20 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
@ -275,7 +275,7 @@
|
||||
VARIABLE_NAME INNODB_LARGE_PREFIX
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE OFF
|
||||
@@ -1307,6 +1503,20 @@
|
||||
@@ -1321,6 +1517,20 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
@ -296,7 +296,7 @@
|
||||
VARIABLE_NAME INNODB_LOCKS_UNSAFE_FOR_BINLOG
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE OFF
|
||||
@@ -1335,6 +1545,62 @@
|
||||
@@ -1349,6 +1559,62 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
@ -359,7 +359,7 @@
|
||||
VARIABLE_NAME INNODB_LOG_BUFFER_SIZE
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 1048576
|
||||
@@ -1363,6 +1629,20 @@
|
||||
@@ -1377,6 +1643,20 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
@ -380,7 +380,7 @@
|
||||
VARIABLE_NAME INNODB_LOG_COMPRESSED_PAGES
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE OFF
|
||||
@@ -1433,6 +1713,34 @@
|
||||
@@ -1447,6 +1727,34 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
@ -415,7 +415,7 @@
|
||||
VARIABLE_NAME INNODB_MAX_DIRTY_PAGES_PCT
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 75.000000
|
||||
@@ -1699,6 +2007,62 @@
|
||||
@@ -1713,6 +2021,62 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
@ -478,7 +478,7 @@
|
||||
VARIABLE_NAME INNODB_PURGE_BATCH_SIZE
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 300
|
||||
@@ -1867,6 +2231,48 @@
|
||||
@@ -1881,6 +2245,48 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
@ -527,7 +527,7 @@
|
||||
VARIABLE_NAME INNODB_SCRUB_LOG
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE OFF
|
||||
@@ -1895,6 +2301,34 @@
|
||||
@@ -1909,6 +2315,34 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
@ -562,7 +562,7 @@
|
||||
VARIABLE_NAME INNODB_SIMULATE_COMP_FAILURES
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE 0
|
||||
@@ -1958,7 +2392,7 @@
|
||||
@@ -1972,7 +2406,7 @@
|
||||
DEFAULT_VALUE nulls_equal
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE ENUM
|
||||
@ -571,7 +571,7 @@
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
@@ -2189,6 +2623,34 @@
|
||||
@@ -2203,6 +2637,34 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY NO
|
||||
COMMAND_LINE_ARGUMENT REQUIRED
|
||||
@ -606,7 +606,7 @@
|
||||
VARIABLE_NAME INNODB_TRX_PURGE_VIEW_UPDATE_ONLY_DEBUG
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE OFF
|
||||
@@ -2266,7 +2728,7 @@
|
||||
@@ -2280,7 +2742,7 @@
|
||||
DEFAULT_VALUE OFF
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE BOOLEAN
|
||||
@ -615,7 +615,7 @@
|
||||
NUMERIC_MIN_VALUE NULL
|
||||
NUMERIC_MAX_VALUE NULL
|
||||
NUMERIC_BLOCK_SIZE NULL
|
||||
@@ -2287,6 +2749,20 @@
|
||||
@@ -2301,6 +2763,20 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT NONE
|
||||
@ -636,7 +636,7 @@
|
||||
VARIABLE_NAME INNODB_USE_MTFLUSH
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE OFF
|
||||
@@ -2301,6 +2777,20 @@
|
||||
@@ -2315,6 +2791,20 @@
|
||||
ENUM_VALUE_LIST NULL
|
||||
READ_ONLY YES
|
||||
COMMAND_LINE_ARGUMENT NONE
|
||||
@ -657,12 +657,12 @@
|
||||
VARIABLE_NAME INNODB_USE_SYS_MALLOC
|
||||
SESSION_VALUE NULL
|
||||
GLOBAL_VALUE ON
|
||||
@@ -2331,12 +2821,12 @@
|
||||
@@ -2345,12 +2835,12 @@
|
||||
COMMAND_LINE_ARGUMENT OPTIONAL
|
||||
VARIABLE_NAME INNODB_VERSION
|
||||
SESSION_VALUE NULL
|
||||
-GLOBAL_VALUE 5.6.27
|
||||
+GLOBAL_VALUE 5.6.26-74.0
|
||||
+GLOBAL_VALUE 5.6.26-76.0
|
||||
GLOBAL_VALUE_ORIGIN COMPILE-TIME
|
||||
DEFAULT_VALUE NULL
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
|
46
mysql-test/suite/sys_vars/t/max_digest_length_basic.test
Normal file
46
mysql-test/suite/sys_vars/t/max_digest_length_basic.test
Normal file
@ -0,0 +1,46 @@
|
||||
# Copyright (C) 2010 Sun Microsystems, Inc.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
|
||||
#
|
||||
# Only global
|
||||
#
|
||||
|
||||
select @@global.max_digest_length;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.max_digest_length;
|
||||
|
||||
show global variables like 'max_digest_length';
|
||||
|
||||
show session variables like 'max_digest_length';
|
||||
|
||||
select * from information_schema.global_variables
|
||||
where variable_name='max_digest_length';
|
||||
|
||||
select * from information_schema.session_variables
|
||||
where variable_name='max_digest_length';
|
||||
|
||||
#
|
||||
# Read-only
|
||||
#
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global max_digest_length=1;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session max_digest_length=1;
|
||||
|
@ -0,0 +1,2 @@
|
||||
--loose-enable-performance-schema
|
||||
--loose-performance-schema-max_digest_length=1024
|
47
mysql-test/suite/sys_vars/t/pfs_max_digest_length_basic.test
Normal file
47
mysql-test/suite/sys_vars/t/pfs_max_digest_length_basic.test
Normal file
@ -0,0 +1,47 @@
|
||||
# Copyright (C) 2010 Sun Microsystems, Inc.
|
||||
#
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
#
|
||||
# Only global
|
||||
#
|
||||
|
||||
select @@global.performance_schema_max_digest_length;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
select @@session.performance_schema_max_digest_length;
|
||||
|
||||
show global variables like 'performance_schema_max_digest_length';
|
||||
|
||||
show session variables like 'performance_schema_max_digest_length';
|
||||
|
||||
select * from information_schema.global_variables
|
||||
where variable_name='performance_schema_max_digest_length';
|
||||
|
||||
select * from information_schema.session_variables
|
||||
where variable_name='performance_schema_max_digest_length';
|
||||
|
||||
#
|
||||
# Read-only
|
||||
#
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set global performance_schema_max_digest_length=1;
|
||||
|
||||
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
set session performance_schema_max_digest_length=1;
|
||||
|
@ -322,6 +322,14 @@ drop table t1;
|
||||
create table t1 (a int, b int as (b is null) virtual);
|
||||
ERROR HY000: A computed column cannot be based on a computed column
|
||||
# end of 5.3 tests
|
||||
create table t1 (v1 varchar(255) as (c1) persistent, c1 varchar(50)) collate=latin1_general_ci;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`v1` varchar(255) AS (c1) PERSISTENT,
|
||||
`c1` varchar(50) COLLATE latin1_general_ci DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
|
||||
drop table t1;
|
||||
#
|
||||
# Start of 10.1 tests
|
||||
#
|
||||
|
@ -284,6 +284,13 @@ create table t1 (a int, b int as (b is null) virtual);
|
||||
|
||||
--echo # end of 5.3 tests
|
||||
|
||||
#
|
||||
# MDEV-7655 SHOW CREATE TABLE returns invalid DDL when using virtual columns along with a table collation
|
||||
#
|
||||
create table t1 (v1 varchar(255) as (c1) persistent, c1 varchar(50)) collate=latin1_general_ci;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.1 tests
|
||||
|
@ -1729,6 +1729,14 @@ show create table t1;
|
||||
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# MDEV-7050: MySQL#74603 - Assertion `comma_length > 0' failed in mysql_prepare_create_table
|
||||
#
|
||||
set @@session.collation_server=filename;
|
||||
create table t1(a enum('',''));
|
||||
drop table t1;
|
||||
set @@session.collation_server=default;
|
||||
|
||||
#
|
||||
# MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS
|
||||
#
|
||||
|
@ -20,6 +20,8 @@ drop table com1;
|
||||
create table `clock$` (a int);
|
||||
drop table `clock$`;
|
||||
|
||||
select convert(convert(',' using filename) using binary);
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-7677 my_charset_handler_filename has a wrong "ismbchar" member
|
||||
--echo #
|
||||
|
@ -1650,6 +1650,22 @@ INSERT INTO t2 VALUES ('aaa');
|
||||
SELECT (SELECT CONCAT(a),1 FROM t1) <=> (SELECT CONCAT(a),1 FROM t2);
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-8630 Datetime value dropped in "INSERT ... SELECT ... ON DUPLICATE KEY"
|
||||
--echo #
|
||||
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;
|
||||
SELECT * FROM t2;
|
||||
DROP TABLE t2, t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
|
@ -883,6 +883,43 @@ SELECT COLUMN_JSON(COLUMN_CREATE('a',0,'b','1'));
|
||||
|
||||
SELECT COLUMN_JSON(COLUMN_CREATE('a',1,'b','1'));
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-8401: COLUMN_CREATE(name, value as DOUBLE) results in string
|
||||
--echo #
|
||||
SELECT COLUMN_JSON(
|
||||
COLUMN_CREATE(
|
||||
'one', 123.456,
|
||||
'two', 123.456 as DOUBLE
|
||||
)
|
||||
);
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-8521: Drastic loss of precision in COLUMN_JSON() on DOUBLEs
|
||||
--echo #
|
||||
|
||||
select column_get(column_create('float', 1.23456789012345E+100 as double), 'float' as double);
|
||||
select column_json(column_create('float', 1.23456789012345E+100 as double));
|
||||
select column_json(column_create('float', 1.23456789012345E+10 as double));
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-9147: Character set is ignored in Dynamic Column for saved string
|
||||
--echo #
|
||||
SET NAMES utf8;
|
||||
SELECT COLUMN_GET(COLUMN_CREATE(1, 0xC2A2 AS CHAR CHARACTER SET latin1), 1 AS CHAR CHARACTER SET utf8) AS a;
|
||||
SELECT COLUMN_GET(COLUMN_CREATE(1, 0xC2A2 AS CHAR CHARACTER SET utf8), 1 AS CHAR CHARACTER SET utf8) AS a;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-9167: COLUMN_CHECK fails on valid decimal data
|
||||
--echo #
|
||||
|
||||
SELECT COLUMN_CHECK(COLUMN_CREATE('a',0 AS DECIMAL,'b',1 AS DECIMAL));
|
||||
|
||||
SELECT COLUMN_CHECK(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL));
|
||||
|
||||
SELECT COLUMN_JSON(COLUMN_CREATE('a',0 AS DECIMAL,'b',1 AS DECIMAL));
|
||||
|
||||
SELECT COLUMN_JSON(COLUMN_CREATE('a',1 AS DECIMAL,'b',1 AS DECIMAL));
|
||||
|
||||
--echo #
|
||||
--echo # end of 10.0 tests
|
||||
--echo #
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user