Automatic merge with 5.1-release (5.1.50)
This commit is contained in:
commit
f7a701ae95
@ -1,4 +1,5 @@
|
|||||||
/* Copyright (C) 2000 MySQL AB
|
/* Copyright (C) 2000 MySQL AB
|
||||||
|
Copyright (C) 2010 Monty Program Ab
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -17,7 +18,7 @@
|
|||||||
#include <sslopt-vars.h>
|
#include <sslopt-vars.h>
|
||||||
#include "../scripts/mysql_fix_privilege_tables_sql.c"
|
#include "../scripts/mysql_fix_privilege_tables_sql.c"
|
||||||
|
|
||||||
#define VER "1.1"
|
#define VER "1.2"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_WAIT_H
|
#ifdef HAVE_SYS_WAIT_H
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
@ -34,8 +35,9 @@
|
|||||||
static char mysql_path[FN_REFLEN];
|
static char mysql_path[FN_REFLEN];
|
||||||
static char mysqlcheck_path[FN_REFLEN];
|
static char mysqlcheck_path[FN_REFLEN];
|
||||||
|
|
||||||
static my_bool opt_force, opt_verbose, debug_info_flag, debug_check_flag;
|
static my_bool opt_force, debug_info_flag, debug_check_flag, opt_silent;
|
||||||
static uint my_end_arg= 0;
|
static my_bool opt_not_used; /* For compatiblity */
|
||||||
|
static uint my_end_arg= 0, opt_verbose;
|
||||||
static char *opt_user= (char*)"root";
|
static char *opt_user= (char*)"root";
|
||||||
|
|
||||||
static DYNAMIC_STRING ds_args;
|
static DYNAMIC_STRING ds_args;
|
||||||
@ -62,12 +64,14 @@ static struct my_option my_long_options[]=
|
|||||||
{
|
{
|
||||||
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"basedir", 'b', "Not used by mysql_upgrade. Only for backward compatibility.",
|
{"basedir", 'b',
|
||||||
|
"Not used by mysql_upgrade. Only for backward compatibility.",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||||
"Directory for character set files.", 0,
|
"Not used by mysql_upgrade. Only for backward compatibility.",
|
||||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
|
||||||
{"compress", OPT_COMPRESS, "Use compression in server/client protocol.",
|
{"compress", OPT_COMPRESS,
|
||||||
|
"Not used by mysql_upgrade. Only for backward compatibility.",
|
||||||
¬_used, ¬_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
¬_used, ¬_used, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"datadir", 'd',
|
{"datadir", 'd',
|
||||||
"Not used by mysql_upgrade. Only for backward compatibility.",
|
"Not used by mysql_upgrade. Only for backward compatibility.",
|
||||||
@ -80,18 +84,17 @@ static struct my_option my_long_options[]=
|
|||||||
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
&default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||||
&debug_check_flag, &debug_check_flag, 0,
|
&debug_check_flag, &debug_check_flag,
|
||||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag,
|
{"debug-info", 'T', "Print some debug info at exit.", &debug_info_flag,
|
||||||
&debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&debug_info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||||
"Set the default character set.", 0,
|
"Not used by mysql_upgrade. Only for backward compatibility.",
|
||||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade "
|
{"force", 'f', "Force execution of mysqlcheck even if mysql_upgrade "
|
||||||
"has already been executed for the current version of MySQL.",
|
"has already been executed for the current version of MySQL.",
|
||||||
&opt_force, &opt_force, 0,
|
&opt_force, &opt_force, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
{"host", 'h', "Connect to host.", 0,
|
||||||
{"host",'h', "Connect to host.", 0,
|
|
||||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"password", 'p',
|
{"password", 'p',
|
||||||
"Password to use when connecting to server. If password is not given,"
|
"Password to use when connecting to server. If password is not given,"
|
||||||
@ -116,6 +119,8 @@ static struct my_option my_long_options[]=
|
|||||||
"Base name of shared memory.", 0,
|
"Base name of shared memory.", 0,
|
||||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
|
{"silent", 's', "Print less information", &opt_silent,
|
||||||
|
&opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"socket", 'S', "The socket file to use for connection.",
|
||||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#include <sslopt-longopts.h>
|
#include <sslopt-longopts.h>
|
||||||
@ -124,8 +129,7 @@ static struct my_option my_long_options[]=
|
|||||||
{"user", 'u', "User for login if not current user.", &opt_user,
|
{"user", 'u', "User for login if not current user.", &opt_user,
|
||||||
&opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"verbose", 'v', "Display more output about the process.",
|
{"verbose", 'v', "Display more output about the process.",
|
||||||
&opt_verbose, &opt_verbose, 0,
|
&opt_not_used, &opt_not_used, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||||
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
|
||||||
{"write-binlog", OPT_WRITE_BINLOG,
|
{"write-binlog", OPT_WRITE_BINLOG,
|
||||||
"All commands including mysqlcheck are binlogged. Enabled by default;"
|
"All commands including mysqlcheck are binlogged. Enabled by default;"
|
||||||
"use --skip-write-binlog when commands should not be sent to replication slaves.",
|
"use --skip-write-binlog when commands should not be sent to replication slaves.",
|
||||||
@ -173,7 +177,7 @@ static void verbose(const char *fmt, ...)
|
|||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
if (!opt_verbose)
|
if (opt_silent)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Print the verbose message */
|
/* Print the verbose message */
|
||||||
@ -266,6 +270,18 @@ get_one_option(int optid, const struct my_option *opt,
|
|||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
case 'v': /* --verbose */
|
case 'v': /* --verbose */
|
||||||
|
opt_verbose++;
|
||||||
|
if (argument == disabled_my_option)
|
||||||
|
{
|
||||||
|
opt_verbose= 0;
|
||||||
|
opt_silent= 1;
|
||||||
|
}
|
||||||
|
add_option= 0;
|
||||||
|
break;
|
||||||
|
case 's':
|
||||||
|
opt_verbose= 0;
|
||||||
|
add_option= 0;
|
||||||
|
break;
|
||||||
case 'f': /* --force */
|
case 'f': /* --force */
|
||||||
add_option= FALSE;
|
add_option= FALSE;
|
||||||
break;
|
break;
|
||||||
@ -426,6 +442,7 @@ static void find_tool(char *tool_executable_name, const char *tool_name,
|
|||||||
len, self_name, FN_LIBCHAR, tool_name);
|
len, self_name, FN_LIBCHAR, tool_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opt_verbose)
|
||||||
verbose("Looking for '%s' as: %s", tool_name, tool_executable_name);
|
verbose("Looking for '%s' as: %s", tool_name, tool_executable_name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -496,7 +513,7 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
|
|||||||
"--database=mysql",
|
"--database=mysql",
|
||||||
"--batch", /* Turns off pager etc. */
|
"--batch", /* Turns off pager etc. */
|
||||||
force ? "--force": "--skip-force",
|
force ? "--force": "--skip-force",
|
||||||
ds_res ? "--silent": "",
|
ds_res || opt_silent ? "--silent": "",
|
||||||
"<",
|
"<",
|
||||||
query_file_path,
|
query_file_path,
|
||||||
"2>&1",
|
"2>&1",
|
||||||
@ -649,6 +666,8 @@ static void create_mysql_upgrade_info_file(void)
|
|||||||
|
|
||||||
static void print_conn_args(const char *tool_name)
|
static void print_conn_args(const char *tool_name)
|
||||||
{
|
{
|
||||||
|
if (opt_verbose < 2)
|
||||||
|
return;
|
||||||
if (conn_args.str[0])
|
if (conn_args.str[0])
|
||||||
verbose("Running '%s' with connection arguments: %s", tool_name,
|
verbose("Running '%s' with connection arguments: %s", tool_name,
|
||||||
conn_args.str);
|
conn_args.str);
|
||||||
@ -664,6 +683,7 @@ static void print_conn_args(const char *tool_name)
|
|||||||
|
|
||||||
static int run_mysqlcheck_upgrade(void)
|
static int run_mysqlcheck_upgrade(void)
|
||||||
{
|
{
|
||||||
|
verbose("Phase 2/3: Checking and upgrading tables");
|
||||||
print_conn_args("mysqlcheck");
|
print_conn_args("mysqlcheck");
|
||||||
return run_tool(mysqlcheck_path,
|
return run_tool(mysqlcheck_path,
|
||||||
NULL, /* Send output from mysqlcheck directly to screen */
|
NULL, /* Send output from mysqlcheck directly to screen */
|
||||||
@ -672,6 +692,8 @@ static int run_mysqlcheck_upgrade(void)
|
|||||||
"--check-upgrade",
|
"--check-upgrade",
|
||||||
"--all-databases",
|
"--all-databases",
|
||||||
"--auto-repair",
|
"--auto-repair",
|
||||||
|
!opt_silent || opt_verbose ? "--verbose": "",
|
||||||
|
opt_silent ? "--silent": "",
|
||||||
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
|
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
@ -679,6 +701,7 @@ static int run_mysqlcheck_upgrade(void)
|
|||||||
|
|
||||||
static int run_mysqlcheck_fixnames(void)
|
static int run_mysqlcheck_fixnames(void)
|
||||||
{
|
{
|
||||||
|
verbose("Phase 1/3: Fixing table and database names");
|
||||||
print_conn_args("mysqlcheck");
|
print_conn_args("mysqlcheck");
|
||||||
return run_tool(mysqlcheck_path,
|
return run_tool(mysqlcheck_path,
|
||||||
NULL, /* Send output from mysqlcheck directly to screen */
|
NULL, /* Send output from mysqlcheck directly to screen */
|
||||||
@ -687,6 +710,8 @@ static int run_mysqlcheck_fixnames(void)
|
|||||||
"--all-databases",
|
"--all-databases",
|
||||||
"--fix-db-names",
|
"--fix-db-names",
|
||||||
"--fix-table-names",
|
"--fix-table-names",
|
||||||
|
opt_verbose ? "--verbose": "",
|
||||||
|
opt_silent ? "--silent": "",
|
||||||
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
|
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
@ -756,7 +781,7 @@ static int run_sql_fix_privilege_tables(void)
|
|||||||
if (init_dynamic_string(&ds_result, "", 512, 512))
|
if (init_dynamic_string(&ds_result, "", 512, 512))
|
||||||
die("Out of memory");
|
die("Out of memory");
|
||||||
|
|
||||||
verbose("Running 'mysql_fix_privilege_tables'...");
|
verbose("Phase 3/3: Running 'mysql_fix_privilege_tables'...");
|
||||||
run_query(mysql_fix_privilege_tables,
|
run_query(mysql_fix_privilege_tables,
|
||||||
&ds_result, /* Collect result */
|
&ds_result, /* Collect result */
|
||||||
TRUE);
|
TRUE);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
/* Copyright (C) 2000 MySQL AB
|
/* Copyright (C) 2000 MySQL AB & Jani Tolonen
|
||||||
|
Copyright (C) 2010 Monty Program Ab
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -15,7 +16,7 @@
|
|||||||
|
|
||||||
/* By Jani Tolonen, 2001-04-20, MySQL Development Team */
|
/* By Jani Tolonen, 2001-04-20, MySQL Development Team */
|
||||||
|
|
||||||
#define CHECK_VERSION "2.5.0"
|
#define CHECK_VERSION "2.6.0"
|
||||||
|
|
||||||
#include "client_priv.h"
|
#include "client_priv.h"
|
||||||
#include <m_ctype.h>
|
#include <m_ctype.h>
|
||||||
@ -222,24 +223,26 @@ static void usage(void)
|
|||||||
{
|
{
|
||||||
print_version();
|
print_version();
|
||||||
puts("By Jani Tolonen, 2001-04-20, MySQL Development Team.\n");
|
puts("By Jani Tolonen, 2001-04-20, MySQL Development Team.\n");
|
||||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n");
|
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,");
|
||||||
puts("and you are welcome to modify and redistribute it under the GPL license.\n");
|
puts("and you are welcome to modify and redistribute it under the GPL license.\n");
|
||||||
|
printf("Usage: %s [OPTIONS] database [tables]\n", my_progname);
|
||||||
|
printf("OR %s [OPTIONS] --databases DB1 [DB2 DB3...]\n",
|
||||||
|
my_progname);
|
||||||
|
printf("OR %s [OPTIONS] --all-databases\n\n", my_progname);
|
||||||
puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),");
|
puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),");
|
||||||
puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
|
puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
|
||||||
puts("used at the same time. Not all options are supported by all storage engines.");
|
puts("used at the same time. Not all options are supported by all storage engines.");
|
||||||
puts("Please consult the MySQL manual for latest information about the");
|
puts("The options -c, -r, -a, and -o are exclusive to each other, which");
|
||||||
puts("above. The options -c, -r, -a, and -o are exclusive to each other, which");
|
|
||||||
puts("means that the last option will be used, if several was specified.\n");
|
puts("means that the last option will be used, if several was specified.\n");
|
||||||
puts("The option -c will be used by default, if none was specified. You");
|
puts("The option -c (--check) will be used by default, if none was specified.");
|
||||||
puts("can change the default behavior by making a symbolic link, or");
|
puts("You can change the default behavior by making a symbolic link, or");
|
||||||
puts("copying this file somewhere with another name, the alternatives are:");
|
puts("copying this file somewhere with another name, the alternatives are:");
|
||||||
puts("mysqlrepair: The default option will be -r");
|
puts("mysqlrepair: The default option will be -r");
|
||||||
puts("mysqlanalyze: The default option will be -a");
|
puts("mysqlanalyze: The default option will be -a");
|
||||||
puts("mysqloptimize: The default option will be -o\n");
|
puts("mysqloptimize: The default option will be -o\n");
|
||||||
printf("Usage: %s [OPTIONS] database [tables]\n", my_progname);
|
puts("Please consult the MariaDB/MySQL knowledgebase at");
|
||||||
printf("OR %s [OPTIONS] --databases DB1 [DB2 DB3...]\n",
|
puts("http://kb.askmonty.org/v/mysqlcheck for latest information about");
|
||||||
my_progname);
|
puts("this program.");
|
||||||
printf("OR %s [OPTIONS] --all-databases\n", my_progname);
|
|
||||||
print_defaults("my", load_default_groups);
|
print_defaults("my", load_default_groups);
|
||||||
my_print_help(my_long_options);
|
my_print_help(my_long_options);
|
||||||
my_print_variables(my_long_options);
|
my_print_variables(my_long_options);
|
||||||
@ -416,6 +419,8 @@ static int process_all_databases()
|
|||||||
MYF(0), mysql_error(sock));
|
MYF(0), mysql_error(sock));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if (verbose)
|
||||||
|
printf("Processing databases\n");
|
||||||
while ((row = mysql_fetch_row(tableres)))
|
while ((row = mysql_fetch_row(tableres)))
|
||||||
{
|
{
|
||||||
if (process_one_db(row[0]))
|
if (process_one_db(row[0]))
|
||||||
@ -429,6 +434,8 @@ static int process_all_databases()
|
|||||||
static int process_databases(char **db_names)
|
static int process_databases(char **db_names)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
|
if (verbose)
|
||||||
|
printf("Processing databases\n");
|
||||||
for ( ; *db_names ; db_names++)
|
for ( ; *db_names ; db_names++)
|
||||||
{
|
{
|
||||||
if (process_one_db(*db_names))
|
if (process_one_db(*db_names))
|
||||||
@ -521,6 +528,7 @@ static int process_all_tables_in_db(char *database)
|
|||||||
MYSQL_RES *res;
|
MYSQL_RES *res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
uint num_columns;
|
uint num_columns;
|
||||||
|
my_bool system_database= 0;
|
||||||
|
|
||||||
LINT_INIT(res);
|
LINT_INIT(res);
|
||||||
if (use_db(database))
|
if (use_db(database))
|
||||||
@ -534,6 +542,9 @@ static int process_all_tables_in_db(char *database)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!strcmp(database, "mysql") || !strcmp(database, "MYSQL"))
|
||||||
|
system_database= 1;
|
||||||
|
|
||||||
num_columns= mysql_num_fields(res);
|
num_columns= mysql_num_fields(res);
|
||||||
|
|
||||||
if (opt_all_in_1 && what_to_do != DO_UPGRADE)
|
if (opt_all_in_1 && what_to_do != DO_UPGRADE)
|
||||||
@ -576,6 +587,10 @@ static int process_all_tables_in_db(char *database)
|
|||||||
/* Skip views if we don't perform renaming. */
|
/* Skip views if we don't perform renaming. */
|
||||||
if ((what_to_do != DO_UPGRADE) && (num_columns == 2) && (strcmp(row[1], "VIEW") == 0))
|
if ((what_to_do != DO_UPGRADE) && (num_columns == 2) && (strcmp(row[1], "VIEW") == 0))
|
||||||
continue;
|
continue;
|
||||||
|
if (system_database &&
|
||||||
|
(!strcmp(row[0], "general_log") ||
|
||||||
|
!strcmp(row[0], "slow_log")))
|
||||||
|
continue; /* Skip logging tables */
|
||||||
|
|
||||||
handle_request_for_tables(row[0], fixed_name_length(row[0]));
|
handle_request_for_tables(row[0], fixed_name_length(row[0]));
|
||||||
}
|
}
|
||||||
@ -624,6 +639,8 @@ static int fix_database_storage_name(const char *name)
|
|||||||
|
|
||||||
static int process_one_db(char *database)
|
static int process_one_db(char *database)
|
||||||
{
|
{
|
||||||
|
if (verbose)
|
||||||
|
puts(database);
|
||||||
if (what_to_do == DO_UPGRADE)
|
if (what_to_do == DO_UPGRADE)
|
||||||
{
|
{
|
||||||
int rc= 0;
|
int rc= 0;
|
||||||
@ -731,7 +748,7 @@ static void print_result()
|
|||||||
{
|
{
|
||||||
MYSQL_RES *res;
|
MYSQL_RES *res;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
char prev[NAME_LEN*2+2];
|
char prev[(NAME_LEN+9)*2+2];
|
||||||
uint i;
|
uint i;
|
||||||
my_bool found_error=0;
|
my_bool found_error=0;
|
||||||
|
|
||||||
@ -761,6 +778,14 @@ static void print_result()
|
|||||||
printf("%-50s %s", row[0], row[3]);
|
printf("%-50s %s", row[0], row[3]);
|
||||||
else if (!status && changed)
|
else if (!status && changed)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
If the error message includes REPAIR TABLE, we assume it means
|
||||||
|
we have to run upgrade on it. In this case we write a nicer message
|
||||||
|
than "Please do "REPAIR TABLE""...
|
||||||
|
*/
|
||||||
|
if (!strcmp(row[2],"error") && strinstr(row[3],"REPAIR TABLE") != 0)
|
||||||
|
printf("%-50s %s", row[0], "Needs upgrade");
|
||||||
|
else
|
||||||
printf("%s\n%-9s: %s", row[0], row[2], row[3]);
|
printf("%s\n%-9s: %s", row[0], row[2], row[3]);
|
||||||
if (strcmp(row[2],"note"))
|
if (strcmp(row[2],"note"))
|
||||||
found_error=1;
|
found_error=1;
|
||||||
@ -780,7 +805,7 @@ static void print_result()
|
|||||||
static int dbConnect(char *host, char *user, char *passwd)
|
static int dbConnect(char *host, char *user, char *passwd)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("dbConnect");
|
DBUG_ENTER("dbConnect");
|
||||||
if (verbose)
|
if (verbose > 1)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "# Connecting to %s...\n", host ? host : "localhost");
|
fprintf(stderr, "# Connecting to %s...\n", host ? host : "localhost");
|
||||||
}
|
}
|
||||||
@ -813,7 +838,7 @@ static int dbConnect(char *host, char *user, char *passwd)
|
|||||||
|
|
||||||
static void dbDisconnect(char *host)
|
static void dbDisconnect(char *host)
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose > 1)
|
||||||
fprintf(stderr, "# Disconnecting from %s...\n", host ? host : "localhost");
|
fprintf(stderr, "# Disconnecting from %s...\n", host ? host : "localhost");
|
||||||
mysql_close(sock);
|
mysql_close(sock);
|
||||||
} /* dbDisconnect */
|
} /* dbDisconnect */
|
||||||
|
1
mysql-test/include/percona_query_response_time_flush.inc
Normal file
1
mysql-test/include/percona_query_response_time_flush.inc
Normal file
@ -0,0 +1 @@
|
|||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
7
mysql-test/include/percona_query_response_time_show.inc
Normal file
7
mysql-test/include/percona_query_response_time_show.inc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
19
mysql-test/include/percona_query_response_time_sleep.inc
Normal file
19
mysql-test/include/percona_query_response_time_sleep.inc
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
SELECT SLEEP(0.31);
|
||||||
|
SELECT SLEEP(0.32);
|
||||||
|
SELECT SLEEP(0.33);
|
||||||
|
SELECT SLEEP(0.34);
|
||||||
|
SELECT SLEEP(0.35);
|
||||||
|
SELECT SLEEP(0.36);
|
||||||
|
SELECT SLEEP(0.37);
|
||||||
|
SELECT SLEEP(0.38);
|
||||||
|
SELECT SLEEP(0.39);
|
||||||
|
SELECT SLEEP(0.40);
|
||||||
|
SELECT SLEEP(1.1);
|
||||||
|
SELECT SLEEP(1.2);
|
||||||
|
SELECT SLEEP(1.3);
|
||||||
|
SELECT SLEEP(1.5);
|
||||||
|
SELECT SLEEP(1.4);
|
||||||
|
SELECT SLEEP(0.5);
|
||||||
|
SELECT SLEEP(2.1);
|
||||||
|
SELECT SLEEP(2.3);
|
||||||
|
SELECT SLEEP(2.5);
|
@ -4228,6 +4228,7 @@ sub extract_warning_lines ($) {
|
|||||||
qr/slave SQL thread aborted/,
|
qr/slave SQL thread aborted/,
|
||||||
qr/unknown option '--loose[-_]/,
|
qr/unknown option '--loose[-_]/,
|
||||||
qr/unknown variable 'loose[-_]/,
|
qr/unknown variable 'loose[-_]/,
|
||||||
|
qr/Invalid .*old.* table or database name/,
|
||||||
qr/Now setting lower_case_table_names to [02]/,
|
qr/Now setting lower_case_table_names to [02]/,
|
||||||
qr/Setting lower_case_table_names=2/,
|
qr/Setting lower_case_table_names=2/,
|
||||||
qr/You have forced lower_case_table_names to 0/,
|
qr/You have forced lower_case_table_names to 0/,
|
||||||
|
@ -12725,8 +12725,7 @@ INSERT INTO t1 (col1, col2) VALUES (1, "value");
|
|||||||
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
|
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
|
||||||
REPAIR TABLE t1;
|
REPAIR TABLE t1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 repair Error Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
|
test.t1 repair status OK
|
||||||
test.t1 repair error Corrupt
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# BUG#48757 - missing .ARZ file causes server crash
|
# BUG#48757 - missing .ARZ file causes server crash
|
||||||
@ -12756,3 +12755,12 @@ a
|
|||||||
1
|
1
|
||||||
2
|
2
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
select * from t1;
|
||||||
|
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
|
||||||
|
repair table t1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair status OK
|
||||||
|
select sum(length(a)),sum(b) from t1;
|
||||||
|
sum(length(a)) sum(b)
|
||||||
|
8670 187
|
||||||
|
drop table t1;
|
||||||
|
@ -115,9 +115,14 @@ create table `#mysql50#abc``def` ( id int );
|
|||||||
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
|
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
|
||||||
ERROR 42000: Incorrect table name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
|
ERROR 42000: Incorrect table name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
|
||||||
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
|
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
|
||||||
create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
|
create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1234` (a int);
|
||||||
create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
|
create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12345` (a int);
|
||||||
ERROR 42000: Incorrect table name '#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
|
ERROR 42000: Incorrect table name '#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12345'
|
||||||
|
show tables;
|
||||||
|
Tables_in_mysqltestbug26703
|
||||||
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1234
|
||||||
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
#mysql50#abc`def
|
||||||
use test;
|
use test;
|
||||||
drop database mysqltestbug26703;
|
drop database mysqltestbug26703;
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
@ -1424,7 +1424,7 @@ ERROR 42S02: Table 'db1.../db2/tb2' doesn't exist
|
|||||||
SELECT * FROM `../db2`.tb2;
|
SELECT * FROM `../db2`.tb2;
|
||||||
ERROR 42000: SELECT command denied to user 'testbug'@'localhost' for table 'tb2'
|
ERROR 42000: SELECT command denied to user 'testbug'@'localhost' for table 'tb2'
|
||||||
SELECT * FROM `#mysql50#/../db2/tb2`;
|
SELECT * FROM `#mysql50#/../db2/tb2`;
|
||||||
ERROR 42S02: Table 'db1.#mysql50#/../db2/tb2' doesn't exist
|
ERROR 42000: Incorrect table name '#mysql50#/../db2/tb2'
|
||||||
DROP USER 'testbug'@localhost;
|
DROP USER 'testbug'@localhost;
|
||||||
DROP TABLE db2.t1;
|
DROP TABLE db2.t1;
|
||||||
DROP DATABASE db1;
|
DROP DATABASE db1;
|
||||||
|
@ -66,6 +66,7 @@ INNODB_LOCKS
|
|||||||
INNODB_LOCK_WAITS
|
INNODB_LOCK_WAITS
|
||||||
INNODB_RSEG
|
INNODB_RSEG
|
||||||
INNODB_SYS_INDEXES
|
INNODB_SYS_INDEXES
|
||||||
|
INNODB_SYS_STATS
|
||||||
INNODB_SYS_TABLES
|
INNODB_SYS_TABLES
|
||||||
INNODB_TABLE_STATS
|
INNODB_TABLE_STATS
|
||||||
INNODB_TRX
|
INNODB_TRX
|
||||||
@ -859,7 +860,6 @@ TABLE_NAME COLUMN_NAME PRIVILEGES
|
|||||||
COLUMNS TABLE_NAME select
|
COLUMNS TABLE_NAME select
|
||||||
COLUMN_PRIVILEGES TABLE_NAME select
|
COLUMN_PRIVILEGES TABLE_NAME select
|
||||||
FILES TABLE_NAME select
|
FILES TABLE_NAME select
|
||||||
INNODB_BUFFER_POOL_PAGES_INDEX table_name select
|
|
||||||
INNODB_INDEX_STATS table_name select
|
INNODB_INDEX_STATS table_name select
|
||||||
INNODB_TABLE_STATS table_name select
|
INNODB_TABLE_STATS table_name select
|
||||||
KEY_COLUMN_USAGE TABLE_NAME select
|
KEY_COLUMN_USAGE TABLE_NAME select
|
||||||
|
@ -39,13 +39,14 @@ XTRADB_ADMIN_COMMAND
|
|||||||
INNODB_TRX
|
INNODB_TRX
|
||||||
INNODB_SYS_TABLES
|
INNODB_SYS_TABLES
|
||||||
INNODB_LOCK_WAITS
|
INNODB_LOCK_WAITS
|
||||||
INNODB_CMPMEM_RESET
|
INNODB_SYS_STATS
|
||||||
INNODB_LOCKS
|
INNODB_LOCKS
|
||||||
INNODB_CMPMEM
|
INNODB_CMPMEM
|
||||||
INNODB_TABLE_STATS
|
INNODB_TABLE_STATS
|
||||||
INNODB_SYS_INDEXES
|
INNODB_SYS_INDEXES
|
||||||
INNODB_CMP_RESET
|
INNODB_CMP_RESET
|
||||||
INNODB_BUFFER_POOL_PAGES_BLOB
|
INNODB_BUFFER_POOL_PAGES_BLOB
|
||||||
|
INNODB_CMPMEM_RESET
|
||||||
INNODB_INDEX_STATS
|
INNODB_INDEX_STATS
|
||||||
SELECT t.table_name, c1.column_name
|
SELECT t.table_name, c1.column_name
|
||||||
FROM information_schema.tables t
|
FROM information_schema.tables t
|
||||||
@ -95,18 +96,19 @@ PBXT_STATISTICS ID
|
|||||||
INNODB_CMP page_size
|
INNODB_CMP page_size
|
||||||
INNODB_RSEG rseg_id
|
INNODB_RSEG rseg_id
|
||||||
XTRADB_ENHANCEMENTS name
|
XTRADB_ENHANCEMENTS name
|
||||||
INNODB_BUFFER_POOL_PAGES_INDEX schema_name
|
INNODB_BUFFER_POOL_PAGES_INDEX index_id
|
||||||
XTRADB_ADMIN_COMMAND result_message
|
XTRADB_ADMIN_COMMAND result_message
|
||||||
INNODB_TRX trx_id
|
INNODB_TRX trx_id
|
||||||
INNODB_SYS_TABLES SCHEMA
|
INNODB_SYS_TABLES SCHEMA
|
||||||
INNODB_LOCK_WAITS requesting_trx_id
|
INNODB_LOCK_WAITS requesting_trx_id
|
||||||
INNODB_CMPMEM_RESET page_size
|
INNODB_SYS_STATS INDEX_ID
|
||||||
INNODB_LOCKS lock_id
|
INNODB_LOCKS lock_id
|
||||||
INNODB_CMPMEM page_size
|
INNODB_CMPMEM page_size
|
||||||
INNODB_TABLE_STATS table_schema
|
INNODB_TABLE_STATS table_schema
|
||||||
INNODB_SYS_INDEXES TABLE_ID
|
INNODB_SYS_INDEXES TABLE_ID
|
||||||
INNODB_CMP_RESET page_size
|
INNODB_CMP_RESET page_size
|
||||||
INNODB_BUFFER_POOL_PAGES_BLOB space_id
|
INNODB_BUFFER_POOL_PAGES_BLOB space_id
|
||||||
|
INNODB_CMPMEM_RESET page_size
|
||||||
INNODB_INDEX_STATS table_schema
|
INNODB_INDEX_STATS table_schema
|
||||||
SELECT t.table_name, c1.column_name
|
SELECT t.table_name, c1.column_name
|
||||||
FROM information_schema.tables t
|
FROM information_schema.tables t
|
||||||
@ -156,18 +158,19 @@ PBXT_STATISTICS ID
|
|||||||
INNODB_CMP page_size
|
INNODB_CMP page_size
|
||||||
INNODB_RSEG rseg_id
|
INNODB_RSEG rseg_id
|
||||||
XTRADB_ENHANCEMENTS name
|
XTRADB_ENHANCEMENTS name
|
||||||
INNODB_BUFFER_POOL_PAGES_INDEX schema_name
|
INNODB_BUFFER_POOL_PAGES_INDEX index_id
|
||||||
XTRADB_ADMIN_COMMAND result_message
|
XTRADB_ADMIN_COMMAND result_message
|
||||||
INNODB_TRX trx_id
|
INNODB_TRX trx_id
|
||||||
INNODB_SYS_TABLES SCHEMA
|
INNODB_SYS_TABLES SCHEMA
|
||||||
INNODB_LOCK_WAITS requesting_trx_id
|
INNODB_LOCK_WAITS requesting_trx_id
|
||||||
INNODB_CMPMEM_RESET page_size
|
INNODB_SYS_STATS INDEX_ID
|
||||||
INNODB_LOCKS lock_id
|
INNODB_LOCKS lock_id
|
||||||
INNODB_CMPMEM page_size
|
INNODB_CMPMEM page_size
|
||||||
INNODB_TABLE_STATS table_schema
|
INNODB_TABLE_STATS table_schema
|
||||||
INNODB_SYS_INDEXES TABLE_ID
|
INNODB_SYS_INDEXES TABLE_ID
|
||||||
INNODB_CMP_RESET page_size
|
INNODB_CMP_RESET page_size
|
||||||
INNODB_BUFFER_POOL_PAGES_BLOB space_id
|
INNODB_BUFFER_POOL_PAGES_BLOB space_id
|
||||||
|
INNODB_CMPMEM_RESET page_size
|
||||||
INNODB_INDEX_STATS table_schema
|
INNODB_INDEX_STATS table_schema
|
||||||
select 1 as f1 from information_schema.tables where "CHARACTER_SETS"=
|
select 1 as f1 from information_schema.tables where "CHARACTER_SETS"=
|
||||||
(select cast(table_name as char) from information_schema.tables
|
(select cast(table_name as char) from information_schema.tables
|
||||||
@ -212,6 +215,7 @@ INNODB_LOCKS information_schema.INNODB_LOCKS 1
|
|||||||
INNODB_LOCK_WAITS information_schema.INNODB_LOCK_WAITS 1
|
INNODB_LOCK_WAITS information_schema.INNODB_LOCK_WAITS 1
|
||||||
INNODB_RSEG information_schema.INNODB_RSEG 1
|
INNODB_RSEG information_schema.INNODB_RSEG 1
|
||||||
INNODB_SYS_INDEXES information_schema.INNODB_SYS_INDEXES 1
|
INNODB_SYS_INDEXES information_schema.INNODB_SYS_INDEXES 1
|
||||||
|
INNODB_SYS_STATS information_schema.INNODB_SYS_STATS 1
|
||||||
INNODB_SYS_TABLES information_schema.INNODB_SYS_TABLES 1
|
INNODB_SYS_TABLES information_schema.INNODB_SYS_TABLES 1
|
||||||
INNODB_TABLE_STATS information_schema.INNODB_TABLE_STATS 1
|
INNODB_TABLE_STATS information_schema.INNODB_TABLE_STATS 1
|
||||||
INNODB_TRX information_schema.INNODB_TRX 1
|
INNODB_TRX information_schema.INNODB_TRX 1
|
||||||
@ -277,13 +281,14 @@ Database: information_schema
|
|||||||
| INNODB_TRX |
|
| INNODB_TRX |
|
||||||
| INNODB_SYS_TABLES |
|
| INNODB_SYS_TABLES |
|
||||||
| INNODB_LOCK_WAITS |
|
| INNODB_LOCK_WAITS |
|
||||||
| INNODB_CMPMEM_RESET |
|
| INNODB_SYS_STATS |
|
||||||
| INNODB_LOCKS |
|
| INNODB_LOCKS |
|
||||||
| INNODB_CMPMEM |
|
| INNODB_CMPMEM |
|
||||||
| INNODB_TABLE_STATS |
|
| INNODB_TABLE_STATS |
|
||||||
| INNODB_SYS_INDEXES |
|
| INNODB_SYS_INDEXES |
|
||||||
| INNODB_CMP_RESET |
|
| INNODB_CMP_RESET |
|
||||||
| INNODB_BUFFER_POOL_PAGES_BLOB |
|
| INNODB_BUFFER_POOL_PAGES_BLOB |
|
||||||
|
| INNODB_CMPMEM_RESET |
|
||||||
| INNODB_INDEX_STATS |
|
| INNODB_INDEX_STATS |
|
||||||
+---------------------------------------+
|
+---------------------------------------+
|
||||||
Database: INFORMATION_SCHEMA
|
Database: INFORMATION_SCHEMA
|
||||||
@ -328,13 +333,14 @@ Database: INFORMATION_SCHEMA
|
|||||||
| INNODB_TRX |
|
| INNODB_TRX |
|
||||||
| INNODB_SYS_TABLES |
|
| INNODB_SYS_TABLES |
|
||||||
| INNODB_LOCK_WAITS |
|
| INNODB_LOCK_WAITS |
|
||||||
| INNODB_CMPMEM_RESET |
|
| INNODB_SYS_STATS |
|
||||||
| INNODB_LOCKS |
|
| INNODB_LOCKS |
|
||||||
| INNODB_CMPMEM |
|
| INNODB_CMPMEM |
|
||||||
| INNODB_TABLE_STATS |
|
| INNODB_TABLE_STATS |
|
||||||
| INNODB_SYS_INDEXES |
|
| INNODB_SYS_INDEXES |
|
||||||
| INNODB_CMP_RESET |
|
| INNODB_CMP_RESET |
|
||||||
| INNODB_BUFFER_POOL_PAGES_BLOB |
|
| INNODB_BUFFER_POOL_PAGES_BLOB |
|
||||||
|
| INNODB_CMPMEM_RESET |
|
||||||
| INNODB_INDEX_STATS |
|
| INNODB_INDEX_STATS |
|
||||||
+---------------------------------------+
|
+---------------------------------------+
|
||||||
Wildcard: inf_rmation_schema
|
Wildcard: inf_rmation_schema
|
||||||
@ -345,5 +351,5 @@ Wildcard: inf_rmation_schema
|
|||||||
+--------------------+
|
+--------------------+
|
||||||
SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA;
|
SELECT table_schema, count(*) FROM information_schema.TABLES WHERE table_schema IN ('mysql', 'INFORMATION_SCHEMA', 'test', 'mysqltest') AND table_name<>'ndb_binlog_index' AND table_name<>'ndb_apply_status' GROUP BY TABLE_SCHEMA;
|
||||||
table_schema count(*)
|
table_schema count(*)
|
||||||
information_schema 46
|
information_schema 47
|
||||||
mysql 22
|
mysql 22
|
||||||
|
@ -11,15 +11,18 @@ Table Op Msg_type Msg_text
|
|||||||
test.bug49823 repair status OK
|
test.bug49823 repair status OK
|
||||||
RENAME TABLE general_log TO renamed_general_log;
|
RENAME TABLE general_log TO renamed_general_log;
|
||||||
RENAME TABLE test.bug49823 TO general_log;
|
RENAME TABLE test.bug49823 TO general_log;
|
||||||
|
Phase 1/3: Fixing table and database names
|
||||||
|
Phase 2/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
mtr.global_suppressions OK
|
mtr.global_suppressions OK
|
||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
|
mysql
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
mysql.db OK
|
mysql.db OK
|
||||||
mysql.event OK
|
mysql.event OK
|
||||||
mysql.func OK
|
mysql.func OK
|
||||||
mysql.general_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.help_category OK
|
mysql.help_category OK
|
||||||
mysql.help_keyword OK
|
mysql.help_keyword OK
|
||||||
mysql.help_relation OK
|
mysql.help_relation OK
|
||||||
@ -31,9 +34,6 @@ mysql.proc OK
|
|||||||
mysql.procs_priv OK
|
mysql.procs_priv OK
|
||||||
mysql.renamed_general_log OK
|
mysql.renamed_general_log OK
|
||||||
mysql.servers OK
|
mysql.servers OK
|
||||||
mysql.slow_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.tables_priv OK
|
mysql.tables_priv OK
|
||||||
mysql.time_zone OK
|
mysql.time_zone OK
|
||||||
mysql.time_zone_leap_second OK
|
mysql.time_zone_leap_second OK
|
||||||
@ -41,6 +41,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
test
|
||||||
|
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||||
|
OK
|
||||||
DROP TABLE general_log;
|
DROP TABLE general_log;
|
||||||
RENAME TABLE renamed_general_log TO general_log;
|
RENAME TABLE renamed_general_log TO general_log;
|
||||||
SET GLOBAL general_log = @saved_general_log;
|
SET GLOBAL general_log = @saved_general_log;
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
Run mysql_upgrade once
|
Run mysql_upgrade once
|
||||||
|
Phase 1/3: Fixing table and database names
|
||||||
|
Phase 2/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
mtr.global_suppressions OK
|
mtr.global_suppressions OK
|
||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
|
mysql
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
mysql.db OK
|
mysql.db OK
|
||||||
mysql.event OK
|
mysql.event OK
|
||||||
mysql.func OK
|
mysql.func OK
|
||||||
mysql.general_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.help_category OK
|
mysql.help_category OK
|
||||||
mysql.help_keyword OK
|
mysql.help_keyword OK
|
||||||
mysql.help_relation OK
|
mysql.help_relation OK
|
||||||
@ -18,9 +21,6 @@ mysql.plugin OK
|
|||||||
mysql.proc OK
|
mysql.proc OK
|
||||||
mysql.procs_priv OK
|
mysql.procs_priv OK
|
||||||
mysql.servers OK
|
mysql.servers OK
|
||||||
mysql.slow_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.tables_priv OK
|
mysql.tables_priv OK
|
||||||
mysql.time_zone OK
|
mysql.time_zone OK
|
||||||
mysql.time_zone_leap_second OK
|
mysql.time_zone_leap_second OK
|
||||||
@ -28,18 +28,24 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
test
|
||||||
|
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||||
|
OK
|
||||||
Run it again - should say already completed
|
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
|
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 wether it's been run before
|
||||||
|
Phase 1/3: Fixing table and database names
|
||||||
|
Phase 2/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
mtr.global_suppressions OK
|
mtr.global_suppressions OK
|
||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
|
mysql
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
mysql.db OK
|
mysql.db OK
|
||||||
mysql.event OK
|
mysql.event OK
|
||||||
mysql.func OK
|
mysql.func OK
|
||||||
mysql.general_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.help_category OK
|
mysql.help_category OK
|
||||||
mysql.help_keyword OK
|
mysql.help_keyword OK
|
||||||
mysql.help_relation OK
|
mysql.help_relation OK
|
||||||
@ -50,9 +56,6 @@ mysql.plugin OK
|
|||||||
mysql.proc OK
|
mysql.proc OK
|
||||||
mysql.procs_priv OK
|
mysql.procs_priv OK
|
||||||
mysql.servers OK
|
mysql.servers OK
|
||||||
mysql.slow_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.tables_priv OK
|
mysql.tables_priv OK
|
||||||
mysql.time_zone OK
|
mysql.time_zone OK
|
||||||
mysql.time_zone_leap_second OK
|
mysql.time_zone_leap_second OK
|
||||||
@ -60,18 +63,24 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
test
|
||||||
|
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||||
|
OK
|
||||||
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
|
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
|
||||||
GRANT ALL ON *.* TO mysqltest1@'%';
|
GRANT ALL ON *.* TO mysqltest1@'%';
|
||||||
Run mysql_upgrade with password protected account
|
Run mysql_upgrade with password protected account
|
||||||
|
Phase 1/3: Fixing table and database names
|
||||||
|
Phase 2/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
mtr.global_suppressions OK
|
mtr.global_suppressions OK
|
||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
|
mysql
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
mysql.db OK
|
mysql.db OK
|
||||||
mysql.event OK
|
mysql.event OK
|
||||||
mysql.func OK
|
mysql.func OK
|
||||||
mysql.general_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.help_category OK
|
mysql.help_category OK
|
||||||
mysql.help_keyword OK
|
mysql.help_keyword OK
|
||||||
mysql.help_relation OK
|
mysql.help_relation OK
|
||||||
@ -82,9 +91,6 @@ mysql.plugin OK
|
|||||||
mysql.proc OK
|
mysql.proc OK
|
||||||
mysql.procs_priv OK
|
mysql.procs_priv OK
|
||||||
mysql.servers OK
|
mysql.servers OK
|
||||||
mysql.slow_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.tables_priv OK
|
mysql.tables_priv OK
|
||||||
mysql.time_zone OK
|
mysql.time_zone OK
|
||||||
mysql.time_zone_leap_second OK
|
mysql.time_zone_leap_second OK
|
||||||
@ -92,20 +98,27 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
test
|
||||||
|
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||||
|
OK
|
||||||
DROP USER mysqltest1@'%';
|
DROP USER mysqltest1@'%';
|
||||||
Run mysql_upgrade with a non existing server socket
|
Run mysql_upgrade with a non existing server socket
|
||||||
|
Phase 1/3: Fixing table and database names
|
||||||
mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
|
mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
|
||||||
FATAL ERROR: Upgrade failed
|
FATAL ERROR: Upgrade failed
|
||||||
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
|
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
|
||||||
|
Phase 1/3: Fixing table and database names
|
||||||
|
Phase 2/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
mtr.global_suppressions OK
|
mtr.global_suppressions OK
|
||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
|
mysql
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
mysql.db OK
|
mysql.db OK
|
||||||
mysql.event OK
|
mysql.event OK
|
||||||
mysql.func OK
|
mysql.func OK
|
||||||
mysql.general_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.help_category OK
|
mysql.help_category OK
|
||||||
mysql.help_keyword OK
|
mysql.help_keyword OK
|
||||||
mysql.help_relation OK
|
mysql.help_relation OK
|
||||||
@ -116,9 +129,6 @@ mysql.plugin OK
|
|||||||
mysql.proc OK
|
mysql.proc OK
|
||||||
mysql.procs_priv OK
|
mysql.procs_priv OK
|
||||||
mysql.servers OK
|
mysql.servers OK
|
||||||
mysql.slow_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.tables_priv OK
|
mysql.tables_priv OK
|
||||||
mysql.time_zone OK
|
mysql.time_zone OK
|
||||||
mysql.time_zone_leap_second OK
|
mysql.time_zone_leap_second OK
|
||||||
@ -126,6 +136,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
test
|
||||||
|
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||||
|
OK
|
||||||
set GLOBAL sql_mode=default;
|
set GLOBAL sql_mode=default;
|
||||||
#
|
#
|
||||||
# Bug #41569 mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table
|
# Bug #41569 mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table
|
||||||
@ -135,15 +148,18 @@ CREATE PROCEDURE testproc() BEGIN END;
|
|||||||
UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
|
UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
|
||||||
UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc';
|
UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc';
|
||||||
UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
|
UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
|
||||||
|
Phase 1/3: Fixing table and database names
|
||||||
|
Phase 2/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
mtr.global_suppressions OK
|
mtr.global_suppressions OK
|
||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
|
mysql
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
mysql.db OK
|
mysql.db OK
|
||||||
mysql.event OK
|
mysql.event OK
|
||||||
mysql.func OK
|
mysql.func OK
|
||||||
mysql.general_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.help_category OK
|
mysql.help_category OK
|
||||||
mysql.help_keyword OK
|
mysql.help_keyword OK
|
||||||
mysql.help_relation OK
|
mysql.help_relation OK
|
||||||
@ -154,9 +170,6 @@ mysql.plugin OK
|
|||||||
mysql.proc OK
|
mysql.proc OK
|
||||||
mysql.procs_priv OK
|
mysql.procs_priv OK
|
||||||
mysql.servers OK
|
mysql.servers OK
|
||||||
mysql.slow_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.tables_priv OK
|
mysql.tables_priv OK
|
||||||
mysql.time_zone OK
|
mysql.time_zone OK
|
||||||
mysql.time_zone_leap_second OK
|
mysql.time_zone_leap_second OK
|
||||||
@ -164,6 +177,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
test
|
||||||
|
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||||
|
OK
|
||||||
CALL testproc();
|
CALL testproc();
|
||||||
DROP PROCEDURE testproc;
|
DROP PROCEDURE testproc;
|
||||||
WARNING: NULL values of the 'character_set_client' column ('mysql.proc' table) have been updated with a default value (latin1). Please verify if necessary.
|
WARNING: NULL values of the 'character_set_client' column ('mysql.proc' table) have been updated with a default value (latin1). Please verify if necessary.
|
||||||
@ -176,15 +192,18 @@ WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been
|
|||||||
GRANT USAGE ON *.* TO 'user3'@'%';
|
GRANT USAGE ON *.* TO 'user3'@'%';
|
||||||
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
|
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
|
||||||
Run mysql_upgrade with all privileges on a user
|
Run mysql_upgrade with all privileges on a user
|
||||||
|
Phase 1/3: Fixing table and database names
|
||||||
|
Phase 2/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
mtr.global_suppressions OK
|
mtr.global_suppressions OK
|
||||||
mtr.test_suppressions OK
|
mtr.test_suppressions OK
|
||||||
|
mysql
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
mysql.db OK
|
mysql.db OK
|
||||||
mysql.event OK
|
mysql.event OK
|
||||||
mysql.func OK
|
mysql.func OK
|
||||||
mysql.general_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.help_category OK
|
mysql.help_category OK
|
||||||
mysql.help_keyword OK
|
mysql.help_keyword OK
|
||||||
mysql.help_relation OK
|
mysql.help_relation OK
|
||||||
@ -195,9 +214,6 @@ mysql.plugin OK
|
|||||||
mysql.proc OK
|
mysql.proc OK
|
||||||
mysql.procs_priv OK
|
mysql.procs_priv OK
|
||||||
mysql.servers OK
|
mysql.servers OK
|
||||||
mysql.slow_log
|
|
||||||
Error : You can't use locks with log tables.
|
|
||||||
status : OK
|
|
||||||
mysql.tables_priv OK
|
mysql.tables_priv OK
|
||||||
mysql.time_zone OK
|
mysql.time_zone OK
|
||||||
mysql.time_zone_leap_second OK
|
mysql.time_zone_leap_second OK
|
||||||
@ -205,6 +221,9 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
test
|
||||||
|
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
||||||
|
OK
|
||||||
SHOW GRANTS FOR 'user3'@'%';
|
SHOW GRANTS FOR 'user3'@'%';
|
||||||
Grants for user3@%
|
Grants for user3@%
|
||||||
GRANT USAGE ON *.* TO 'user3'@'%'
|
GRANT USAGE ON *.* TO 'user3'@'%'
|
||||||
|
@ -7,8 +7,6 @@ mysql.columns_priv OK
|
|||||||
mysql.db OK
|
mysql.db OK
|
||||||
mysql.event OK
|
mysql.event OK
|
||||||
mysql.func OK
|
mysql.func OK
|
||||||
mysql.general_log
|
|
||||||
note : The storage engine for the table doesn't support optimize
|
|
||||||
mysql.help_category OK
|
mysql.help_category OK
|
||||||
mysql.help_keyword OK
|
mysql.help_keyword OK
|
||||||
mysql.help_relation OK
|
mysql.help_relation OK
|
||||||
@ -19,8 +17,6 @@ mysql.plugin OK
|
|||||||
mysql.proc OK
|
mysql.proc OK
|
||||||
mysql.procs_priv OK
|
mysql.procs_priv OK
|
||||||
mysql.servers OK
|
mysql.servers OK
|
||||||
mysql.slow_log
|
|
||||||
note : The storage engine for the table doesn't support optimize
|
|
||||||
mysql.tables_priv OK
|
mysql.tables_priv OK
|
||||||
mysql.time_zone OK
|
mysql.time_zone OK
|
||||||
mysql.time_zone_leap_second OK
|
mysql.time_zone_leap_second OK
|
||||||
@ -32,8 +28,6 @@ mysql.columns_priv OK
|
|||||||
mysql.db OK
|
mysql.db OK
|
||||||
mysql.event OK
|
mysql.event OK
|
||||||
mysql.func OK
|
mysql.func OK
|
||||||
mysql.general_log
|
|
||||||
note : The storage engine for the table doesn't support optimize
|
|
||||||
mysql.help_category OK
|
mysql.help_category OK
|
||||||
mysql.help_keyword OK
|
mysql.help_keyword OK
|
||||||
mysql.help_relation OK
|
mysql.help_relation OK
|
||||||
@ -44,8 +38,6 @@ mysql.plugin OK
|
|||||||
mysql.proc OK
|
mysql.proc OK
|
||||||
mysql.procs_priv OK
|
mysql.procs_priv OK
|
||||||
mysql.servers OK
|
mysql.servers OK
|
||||||
mysql.slow_log
|
|
||||||
note : The storage engine for the table doesn't support optimize
|
|
||||||
mysql.tables_priv OK
|
mysql.tables_priv OK
|
||||||
mysql.time_zone OK
|
mysql.time_zone OK
|
||||||
mysql.time_zone_leap_second OK
|
mysql.time_zone_leap_second OK
|
||||||
|
@ -1,47 +1,47 @@
|
|||||||
DROP TABLE IF EXISTS t1;
|
DROP TABLE IF EXISTS t1;
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
ERROR 42000: Unknown table engine 'partition'
|
ERROR 42000: Unknown table engine 'partition'
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
ERROR 42000: Unknown table engine 'partition'
|
ERROR 42000: Unknown table engine 'partition'
|
||||||
ANALYZE TABLE t1;
|
ANALYZE TABLE t1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 analyze Error Unknown table engine 'partition'
|
test.t1 analyze Error Unknown table engine 'partition'
|
||||||
test.t1 analyze error Corrupt
|
test.t1 analyze error Corrupt
|
||||||
CHECK TABLE t1;
|
CHECK TABLE t1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 check Error Unknown table engine 'partition'
|
test.t1 check Error Unknown table engine 'partition'
|
||||||
test.t1 check error Corrupt
|
test.t1 check error Corrupt
|
||||||
OPTIMIZE TABLE t1;
|
OPTIMIZE TABLE t1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 optimize Error Unknown table engine 'partition'
|
test.t1 optimize Error Unknown table engine 'partition'
|
||||||
test.t1 optimize error Corrupt
|
test.t1 optimize error Corrupt
|
||||||
REPAIR TABLE t1;
|
REPAIR TABLE t1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 repair Error Unknown table engine 'partition'
|
test.t1 repair Error Unknown table engine 'partition'
|
||||||
test.t1 repair error Corrupt
|
test.t1 repair error Corrupt
|
||||||
ALTER TABLE t1 REPAIR PARTITION ALL;
|
ALTER TABLE t1 REPAIR PARTITION ALL;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 repair Error Unknown table engine 'partition'
|
test.t1 repair Error Unknown table engine 'partition'
|
||||||
test.t1 repair error Corrupt
|
test.t1 repair error Corrupt
|
||||||
ALTER TABLE t1 CHECK PARTITION ALL;
|
ALTER TABLE t1 CHECK PARTITION ALL;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 check Error Unknown table engine 'partition'
|
test.t1 check Error Unknown table engine 'partition'
|
||||||
test.t1 check error Corrupt
|
test.t1 check error Corrupt
|
||||||
ALTER TABLE t1 OPTIMIZE PARTITION ALL;
|
ALTER TABLE t1 OPTIMIZE PARTITION ALL;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 optimize Error Unknown table engine 'partition'
|
test.t1 optimize Error Unknown table engine 'partition'
|
||||||
test.t1 optimize error Corrupt
|
test.t1 optimize error Corrupt
|
||||||
ALTER TABLE t1 ANALYZE PARTITION ALL;
|
ALTER TABLE t1 ANALYZE PARTITION ALL;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 analyze Error Unknown table engine 'partition'
|
test.t1 analyze Error Unknown table engine 'partition'
|
||||||
test.t1 analyze error Corrupt
|
test.t1 analyze error Corrupt
|
||||||
ALTER TABLE t1 REBUILD PARTITION ALL;
|
ALTER TABLE t1 REBUILD PARTITION ALL;
|
||||||
ERROR 42000: Unknown table engine 'partition'
|
ERROR 42000: Unknown table engine 'partition'
|
||||||
ALTER TABLE t1 ENGINE Memory;
|
ALTER TABLE t1 ENGINE Memory;
|
||||||
ERROR 42000: Unknown table engine 'partition'
|
ERROR 42000: Unknown table engine 'partition'
|
||||||
ALTER TABLE t1 ADD (new INT);
|
ALTER TABLE t1 ADD (new INT);
|
||||||
ERROR 42000: Unknown table engine 'partition'
|
ERROR 42000: Unknown table engine 'partition'
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
firstname VARCHAR(25) NOT NULL,
|
firstname VARCHAR(25) NOT NULL,
|
||||||
|
@ -977,7 +977,7 @@ NULL test t1 c NULL NO int NULL NULL int(11) PRI select,insert,update,reference
|
|||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
SHOW TABLES LIKE 't1';
|
SHOW TABLES LIKE 't1';
|
||||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||||
def TABLE_NAMES TABLE_NAME Tables_in_test (t1) 253 192 2 N 1 0 33
|
def TABLE_NAMES TABLE_NAME Tables_in_test (t1) 253 219 2 N 1 0 33
|
||||||
Tables_in_test (t1)
|
Tables_in_test (t1)
|
||||||
t1
|
t1
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
@ -139,4 +139,12 @@ USE `#mysql50#.`;
|
|||||||
ERROR 42000: Incorrect database name '#mysql50#.'
|
ERROR 42000: Incorrect database name '#mysql50#.'
|
||||||
USE `#mysql50#../blablabla`;
|
USE `#mysql50#../blablabla`;
|
||||||
ERROR 42000: Incorrect database name '#mysql50#../blablabla'
|
ERROR 42000: Incorrect database name '#mysql50#../blablabla'
|
||||||
|
show full tables;
|
||||||
|
Tables_in_test Table_type
|
||||||
|
#mysql50#ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com BASE TABLE
|
||||||
|
rename table `#mysql50#ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com` to `ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com`;
|
||||||
|
show full tables;
|
||||||
|
Tables_in_test Table_type
|
||||||
|
ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com BASE TABLE
|
||||||
|
drop table `ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com`;
|
||||||
# End of 5.1 tests
|
# End of 5.1 tests
|
||||||
|
BIN
mysql-test/std_data/archive_5_0.ARM
Normal file
BIN
mysql-test/std_data/archive_5_0.ARM
Normal file
Binary file not shown.
BIN
mysql-test/std_data/archive_5_0.ARZ
Normal file
BIN
mysql-test/std_data/archive_5_0.ARZ
Normal file
Binary file not shown.
BIN
mysql-test/std_data/archive_5_0.frm
Normal file
BIN
mysql-test/std_data/archive_5_0.frm
Normal file
Binary file not shown.
BIN
mysql-test/std_data/long_table_name.MYD
Normal file
BIN
mysql-test/std_data/long_table_name.MYD
Normal file
Binary file not shown.
BIN
mysql-test/std_data/long_table_name.MYI
Normal file
BIN
mysql-test/std_data/long_table_name.MYI
Normal file
Binary file not shown.
BIN
mysql-test/std_data/long_table_name.frm
Normal file
BIN
mysql-test/std_data/long_table_name.frm
Normal file
Binary file not shown.
@ -2,4 +2,6 @@
|
|||||||
# For both statement and row based bin logs 9/19/2005 [jbm]
|
# For both statement and row based bin logs 9/19/2005 [jbm]
|
||||||
|
|
||||||
-- source include/have_binlog_format_row.inc
|
-- source include/have_binlog_format_row.inc
|
||||||
-- source extra/binlog_tests/binlog.test
|
let collation=utf8_unicode_ci;
|
||||||
|
--source include/have_collation.inc
|
||||||
|
--source extra/binlog_tests/binlog.test
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
-- source include/not_embedded.inc
|
-- source include/not_embedded.inc
|
||||||
-- source include/have_binlog_format_mixed.inc
|
-- source include/have_binlog_format_mixed.inc
|
||||||
|
let collation=utf8_unicode_ci;
|
||||||
|
--source include/have_collation.inc
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
|
@ -113,35 +113,33 @@ NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NU
|
|||||||
NULL information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
|
NULL information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
|
||||||
NULL information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
NULL information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
||||||
NULL information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
|
NULL information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES fix_count 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES fix_count 5 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES flush_type 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES flush_type 6 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES lru_position 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES lru_position 4 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES page_no 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES page_no 3 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES page_type 1 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES page_type 1 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES space_id 2 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES space_id 2 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB compressed 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB compressed 3 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB fix_count 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB fix_count 7 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB flush_type 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB flush_type 8 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB lru_position 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB lru_position 6 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB next_page_no 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB next_page_no 5 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB page_no 2 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB page_no 2 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB part_len 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB part_len 4 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB space_id 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB space_id 1 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX access_time 9 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX access_time 7 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX data_size 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX data_size 5 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX dirty 11 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX dirty 9 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX fix_count 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX fix_count 12 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX flush_type 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX flush_type 13 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX hashed 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX hashed 6 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX index_name 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX index_id 1 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX lru_position 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX lru_position 11 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX modified 10 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX modified 8 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX n_recs 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX n_recs 4 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX old 12 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX old 10 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX page_no 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX page_no 3 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX schema_name 1 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX space_id 2 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX space_id 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX table_name 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
|
||||||
NULL information_schema INNODB_CMP compress_ops 2 0 NO int NULL NULL 10 0 NULL NULL int(11) select
|
NULL information_schema INNODB_CMP compress_ops 2 0 NO int NULL NULL 10 0 NULL NULL int(11) select
|
||||||
NULL information_schema INNODB_CMP compress_ops_ok 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select
|
NULL information_schema INNODB_CMP compress_ops_ok 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select
|
||||||
NULL information_schema INNODB_CMP compress_time 4 0 NO int NULL NULL 10 0 NULL NULL int(11) select
|
NULL information_schema INNODB_CMP compress_time 4 0 NO int NULL NULL 10 0 NULL NULL int(11) select
|
||||||
@ -164,10 +162,10 @@ NULL information_schema INNODB_CMP_RESET compress_time 4 0 NO int NULL NULL 10 0
|
|||||||
NULL information_schema INNODB_CMP_RESET page_size 1 0 NO int NULL NULL 10 0 NULL NULL int(5) select
|
NULL information_schema INNODB_CMP_RESET page_size 1 0 NO int NULL NULL 10 0 NULL NULL int(5) select
|
||||||
NULL information_schema INNODB_CMP_RESET uncompress_ops 5 0 NO int NULL NULL 10 0 NULL NULL int(11) select
|
NULL information_schema INNODB_CMP_RESET uncompress_ops 5 0 NO int NULL NULL 10 0 NULL NULL int(11) select
|
||||||
NULL information_schema INNODB_CMP_RESET uncompress_time 6 0 NO int NULL NULL 10 0 NULL NULL int(11) select
|
NULL information_schema INNODB_CMP_RESET uncompress_time 6 0 NO int NULL NULL 10 0 NULL NULL int(11) select
|
||||||
NULL information_schema INNODB_INDEX_STATS fields 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_INDEX_STATS fields 4 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_INDEX_STATS index_name 3 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
NULL information_schema INNODB_INDEX_STATS index_name 3 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
||||||
NULL information_schema INNODB_INDEX_STATS index_size 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_INDEX_STATS index_size 6 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_INDEX_STATS leaf_pages 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_INDEX_STATS leaf_pages 7 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_INDEX_STATS row_per_keys 5 NO varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
|
NULL information_schema INNODB_INDEX_STATS row_per_keys 5 NO varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select
|
||||||
NULL information_schema INNODB_INDEX_STATS table_name 2 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
NULL information_schema INNODB_INDEX_STATS table_name 2 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
||||||
NULL information_schema INNODB_INDEX_STATS table_schema 1 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
NULL information_schema INNODB_INDEX_STATS table_schema 1 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
||||||
@ -175,9 +173,9 @@ NULL information_schema INNODB_LOCKS lock_data 10 NULL YES varchar 8192 24576 NU
|
|||||||
NULL information_schema INNODB_LOCKS lock_id 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
|
NULL information_schema INNODB_LOCKS lock_id 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
|
||||||
NULL information_schema INNODB_LOCKS lock_index 6 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
|
NULL information_schema INNODB_LOCKS lock_index 6 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
|
||||||
NULL information_schema INNODB_LOCKS lock_mode 3 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
|
NULL information_schema INNODB_LOCKS lock_mode 3 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
|
||||||
NULL information_schema INNODB_LOCKS lock_page 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_LOCKS lock_page 8 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_LOCKS lock_rec 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_LOCKS lock_rec 9 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_LOCKS lock_space 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_LOCKS lock_space 7 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_LOCKS lock_table 5 NO varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
|
NULL information_schema INNODB_LOCKS lock_table 5 NO varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
|
||||||
NULL information_schema INNODB_LOCKS lock_trx_id 2 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
|
NULL information_schema INNODB_LOCKS lock_trx_id 2 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
|
||||||
NULL information_schema INNODB_LOCKS lock_type 4 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
|
NULL information_schema INNODB_LOCKS lock_type 4 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select
|
||||||
@ -185,42 +183,45 @@ NULL information_schema INNODB_LOCK_WAITS blocking_lock_id 4 NO varchar 81 243
|
|||||||
NULL information_schema INNODB_LOCK_WAITS blocking_trx_id 3 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
|
NULL information_schema INNODB_LOCK_WAITS blocking_trx_id 3 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
|
||||||
NULL information_schema INNODB_LOCK_WAITS requested_lock_id 2 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
|
NULL information_schema INNODB_LOCK_WAITS requested_lock_id 2 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
|
||||||
NULL information_schema INNODB_LOCK_WAITS requesting_trx_id 1 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
|
NULL information_schema INNODB_LOCK_WAITS requesting_trx_id 1 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
|
||||||
NULL information_schema INNODB_RSEG curr_size 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_RSEG curr_size 6 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_RSEG max_size 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_RSEG max_size 5 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_RSEG page_no 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_RSEG page_no 4 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_RSEG rseg_id 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_RSEG rseg_id 1 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_RSEG space_id 2 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_RSEG space_id 2 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_RSEG zip_size 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_RSEG zip_size 3 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_SYS_INDEXES ID 2 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_SYS_INDEXES ID 2 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_SYS_INDEXES NAME 3 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
NULL information_schema INNODB_SYS_INDEXES NAME 3 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
||||||
NULL information_schema INNODB_SYS_INDEXES N_FIELDS 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_SYS_INDEXES N_FIELDS 4 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_SYS_INDEXES PAGE_NO 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_SYS_INDEXES PAGE_NO 7 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_SYS_INDEXES SPACE 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_SYS_INDEXES SPACE 6 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_SYS_INDEXES TABLE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_SYS_INDEXES TABLE_ID 1 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_SYS_INDEXES TYPE 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_SYS_INDEXES TYPE 5 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
|
NULL information_schema INNODB_SYS_STATS DIFF_VALS 3 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
|
NULL information_schema INNODB_SYS_STATS INDEX_ID 1 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
|
NULL information_schema INNODB_SYS_STATS KEY_COLS 2 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_SYS_TABLES CLUSTER_NAME 8 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
NULL information_schema INNODB_SYS_TABLES CLUSTER_NAME 8 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
||||||
NULL information_schema INNODB_SYS_TABLES ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_SYS_TABLES ID 3 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_SYS_TABLES MIX_ID 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_SYS_TABLES MIX_ID 6 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_SYS_TABLES MIX_LEN 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_SYS_TABLES MIX_LEN 7 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_SYS_TABLES NAME 2 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
NULL information_schema INNODB_SYS_TABLES NAME 2 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
||||||
NULL information_schema INNODB_SYS_TABLES N_COLS 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_SYS_TABLES N_COLS 4 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_SYS_TABLES SCHEMA 1 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
NULL information_schema INNODB_SYS_TABLES SCHEMA 1 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
||||||
NULL information_schema INNODB_SYS_TABLES SPACE 9 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_SYS_TABLES SPACE 9 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_SYS_TABLES TYPE 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_SYS_TABLES TYPE 5 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_TABLE_STATS clust_size 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_TABLE_STATS clust_size 4 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_TABLE_STATS modified 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_TABLE_STATS modified 6 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_TABLE_STATS other_size 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_TABLE_STATS other_size 5 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_TABLE_STATS rows 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_TABLE_STATS rows 3 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_TABLE_STATS table_name 2 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
NULL information_schema INNODB_TABLE_STATS table_name 2 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
||||||
NULL information_schema INNODB_TABLE_STATS table_schema 1 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
NULL information_schema INNODB_TABLE_STATS table_schema 1 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
|
||||||
NULL information_schema INNODB_TRX trx_id 1 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
|
NULL information_schema INNODB_TRX trx_id 1 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select
|
||||||
NULL information_schema INNODB_TRX trx_mysql_thread_id 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_TRX trx_mysql_thread_id 7 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema INNODB_TRX trx_query 8 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
|
NULL information_schema INNODB_TRX trx_query 8 NULL YES varchar 1024 3072 NULL NULL utf8 utf8_general_ci varchar(1024) select
|
||||||
NULL information_schema INNODB_TRX trx_requested_lock_id 4 NULL YES varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
|
NULL information_schema INNODB_TRX trx_requested_lock_id 4 NULL YES varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select
|
||||||
NULL information_schema INNODB_TRX trx_started 3 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
|
NULL information_schema INNODB_TRX trx_started 3 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select
|
||||||
NULL information_schema INNODB_TRX trx_state 2 NO varchar 13 39 NULL NULL utf8 utf8_general_ci varchar(13) select
|
NULL information_schema INNODB_TRX trx_state 2 NO varchar 13 39 NULL NULL utf8 utf8_general_ci varchar(13) select
|
||||||
NULL information_schema INNODB_TRX trx_wait_started 5 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
|
NULL information_schema INNODB_TRX trx_wait_started 5 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
|
||||||
NULL information_schema INNODB_TRX trx_weight 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
|
NULL information_schema INNODB_TRX trx_weight 6 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
||||||
NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
|
NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select
|
||||||
NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
||||||
@ -600,9 +601,7 @@ NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB next_page_no bigint NULL N
|
|||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB lru_position bigint NULL NULL NULL NULL bigint(21) unsigned
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB lru_position bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB fix_count bigint NULL NULL NULL NULL bigint(21) unsigned
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB fix_count bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB flush_type bigint NULL NULL NULL NULL bigint(21) unsigned
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_BLOB flush_type bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
3.0000 information_schema INNODB_BUFFER_POOL_PAGES_INDEX schema_name varchar 64 192 utf8 utf8_general_ci varchar(64)
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX index_id bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
3.0000 information_schema INNODB_BUFFER_POOL_PAGES_INDEX table_name varchar 64 192 utf8 utf8_general_ci varchar(64)
|
|
||||||
3.0000 information_schema INNODB_BUFFER_POOL_PAGES_INDEX index_name varchar 64 192 utf8 utf8_general_ci varchar(64)
|
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX space_id bigint NULL NULL NULL NULL bigint(21) unsigned
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX space_id bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX page_no bigint NULL NULL NULL NULL bigint(21) unsigned
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX page_no bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX n_recs bigint NULL NULL NULL NULL bigint(21) unsigned
|
NULL information_schema INNODB_BUFFER_POOL_PAGES_INDEX n_recs bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
@ -671,6 +670,9 @@ NULL information_schema INNODB_SYS_INDEXES N_FIELDS bigint NULL NULL NULL NULL b
|
|||||||
NULL information_schema INNODB_SYS_INDEXES TYPE bigint NULL NULL NULL NULL bigint(21) unsigned
|
NULL information_schema INNODB_SYS_INDEXES TYPE bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
NULL information_schema INNODB_SYS_INDEXES SPACE bigint NULL NULL NULL NULL bigint(21) unsigned
|
NULL information_schema INNODB_SYS_INDEXES SPACE bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
NULL information_schema INNODB_SYS_INDEXES PAGE_NO bigint NULL NULL NULL NULL bigint(21) unsigned
|
NULL information_schema INNODB_SYS_INDEXES PAGE_NO bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
|
NULL information_schema INNODB_SYS_STATS INDEX_ID bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
|
NULL information_schema INNODB_SYS_STATS KEY_COLS bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
|
NULL information_schema INNODB_SYS_STATS DIFF_VALS bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
3.0000 information_schema INNODB_SYS_TABLES SCHEMA varchar 192 576 utf8 utf8_general_ci varchar(192)
|
3.0000 information_schema INNODB_SYS_TABLES SCHEMA varchar 192 576 utf8 utf8_general_ci varchar(192)
|
||||||
3.0000 information_schema INNODB_SYS_TABLES NAME varchar 192 576 utf8 utf8_general_ci varchar(192)
|
3.0000 information_schema INNODB_SYS_TABLES NAME varchar 192 576 utf8 utf8_general_ci varchar(192)
|
||||||
NULL information_schema INNODB_SYS_TABLES ID bigint NULL NULL NULL NULL bigint(21) unsigned
|
NULL information_schema INNODB_SYS_TABLES ID bigint NULL NULL NULL NULL bigint(21) unsigned
|
||||||
|
@ -2,7 +2,7 @@ SELECT * FROM information_schema.engines
|
|||||||
WHERE ENGINE = 'InnoDB';
|
WHERE ENGINE = 'InnoDB';
|
||||||
ENGINE InnoDB
|
ENGINE InnoDB
|
||||||
SUPPORT YES
|
SUPPORT YES
|
||||||
COMMENT Supports transactions, row-level locking, and foreign keys
|
COMMENT Percona-XtraDB, Supports transactions, row-level locking, and foreign keys
|
||||||
TRANSACTIONS YES
|
TRANSACTIONS YES
|
||||||
XA YES
|
XA YES
|
||||||
SAVEPOINTS YES
|
SAVEPOINTS YES
|
||||||
|
@ -521,6 +521,29 @@ user_comment
|
|||||||
Separator -----------------------------------------------------
|
Separator -----------------------------------------------------
|
||||||
TABLE_CATALOG NULL
|
TABLE_CATALOG NULL
|
||||||
TABLE_SCHEMA information_schema
|
TABLE_SCHEMA information_schema
|
||||||
|
TABLE_NAME INNODB_SYS_STATS
|
||||||
|
TABLE_TYPE SYSTEM VIEW
|
||||||
|
ENGINE MEMORY
|
||||||
|
VERSION 10
|
||||||
|
ROW_FORMAT Fixed
|
||||||
|
TABLE_ROWS #TBLR#
|
||||||
|
AVG_ROW_LENGTH #ARL#
|
||||||
|
DATA_LENGTH #DL#
|
||||||
|
MAX_DATA_LENGTH #MDL#
|
||||||
|
INDEX_LENGTH #IL#
|
||||||
|
DATA_FREE #DF#
|
||||||
|
AUTO_INCREMENT NULL
|
||||||
|
CREATE_TIME #CRT#
|
||||||
|
UPDATE_TIME #UT#
|
||||||
|
CHECK_TIME #CT#
|
||||||
|
TABLE_COLLATION utf8_general_ci
|
||||||
|
CHECKSUM NULL
|
||||||
|
CREATE_OPTIONS #CO#
|
||||||
|
TABLE_COMMENT #TC#
|
||||||
|
user_comment
|
||||||
|
Separator -----------------------------------------------------
|
||||||
|
TABLE_CATALOG NULL
|
||||||
|
TABLE_SCHEMA information_schema
|
||||||
TABLE_NAME INNODB_SYS_TABLES
|
TABLE_NAME INNODB_SYS_TABLES
|
||||||
TABLE_TYPE SYSTEM VIEW
|
TABLE_TYPE SYSTEM VIEW
|
||||||
ENGINE MEMORY
|
ENGINE MEMORY
|
||||||
@ -1573,6 +1596,29 @@ user_comment
|
|||||||
Separator -----------------------------------------------------
|
Separator -----------------------------------------------------
|
||||||
TABLE_CATALOG NULL
|
TABLE_CATALOG NULL
|
||||||
TABLE_SCHEMA information_schema
|
TABLE_SCHEMA information_schema
|
||||||
|
TABLE_NAME INNODB_SYS_STATS
|
||||||
|
TABLE_TYPE SYSTEM VIEW
|
||||||
|
ENGINE MEMORY
|
||||||
|
VERSION 10
|
||||||
|
ROW_FORMAT Fixed
|
||||||
|
TABLE_ROWS #TBLR#
|
||||||
|
AVG_ROW_LENGTH #ARL#
|
||||||
|
DATA_LENGTH #DL#
|
||||||
|
MAX_DATA_LENGTH #MDL#
|
||||||
|
INDEX_LENGTH #IL#
|
||||||
|
DATA_FREE #DF#
|
||||||
|
AUTO_INCREMENT NULL
|
||||||
|
CREATE_TIME #CRT#
|
||||||
|
UPDATE_TIME #UT#
|
||||||
|
CHECK_TIME #CT#
|
||||||
|
TABLE_COLLATION utf8_general_ci
|
||||||
|
CHECKSUM NULL
|
||||||
|
CREATE_OPTIONS #CO#
|
||||||
|
TABLE_COMMENT #TC#
|
||||||
|
user_comment
|
||||||
|
Separator -----------------------------------------------------
|
||||||
|
TABLE_CATALOG NULL
|
||||||
|
TABLE_SCHEMA information_schema
|
||||||
TABLE_NAME INNODB_SYS_TABLES
|
TABLE_NAME INNODB_SYS_TABLES
|
||||||
TABLE_TYPE SYSTEM VIEW
|
TABLE_TYPE SYSTEM VIEW
|
||||||
ENGINE MEMORY
|
ENGINE MEMORY
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
let $my_where = WHERE table_schema = 'information_schema'
|
let $my_where = WHERE table_schema = 'information_schema'
|
||||||
AND table_name <> 'profiling';
|
AND table_name <> 'profiling';
|
||||||
--source suite/funcs_1/datadict/tables1.inc
|
--source suite/funcs_1/datadict/tables1.inc
|
||||||
|
@ -11,5 +11,4 @@
|
|||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
#innodb : Bug#53306 2010-04-30 VasilDimov valgrind warnings
|
#innodb : Bug#53306 2010-04-30 VasilDimov valgrind warnings
|
||||||
innodb_bug48024 : Waiting for merge with Percona Server; bug fixed in innodb_plugin in MySQL 5.1.48
|
|
||||||
innodb_bug53756 : Waiting for merge with Percona Server; bug fixed in innodb_plugin in MySQL 5.1.50
|
innodb_bug53756 : Waiting for merge with Percona Server; bug fixed in innodb_plugin in MySQL 5.1.50
|
||||||
|
@ -14,6 +14,8 @@
|
|||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
|
let collation=utf8_unicode_ci;
|
||||||
|
--source include/have_collation.inc
|
||||||
|
|
||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||||
|
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
# Slow test, don't run during staging part
|
# Slow test, don't run during staging part
|
||||||
-- source include/not_staging.inc
|
-- source include/not_staging.inc
|
||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
|
-- source include/have_query_cache.inc
|
||||||
|
|
||||||
let $engine_type= InnoDB;
|
let $engine_type= InnoDB;
|
||||||
let $other_engine_type= MEMORY;
|
let $other_engine_type= MEMORY;
|
||||||
# InnoDB does support FOREIGN KEYFOREIGN KEYs
|
# InnoDB does support FOREIGN KEYFOREIGN KEYs
|
||||||
|
@ -10,11 +10,4 @@
|
|||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
innodb_bug48024 : Waiting for merge/fix from XtraDB
|
innodb_bug52745: Disabled as this has valgrind failures (also in MySQL 5.1.50)
|
||||||
innodb_bug53590 : Waiting for merge/fix from XtraDB
|
|
||||||
innodb_bug53591 : Waiting for merge/fix from XtraDB
|
|
||||||
innodb_bug53592 : Waiting for merge/fix from XtraDB
|
|
||||||
innodb-use-sys-malloc : Waiting for bugfix from Percona for LP#612600
|
|
||||||
innodb_bug53290 : Waiting for merge/fix from XtraDB
|
|
||||||
innodb_bug54679 : Waiting for merge/fix from XtraDB
|
|
||||||
innodb_bug52745 : Waiting for merge/fix from XtraDB
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
-- source include/have_innodb_plugin.inc
|
-- source include/have_innodb_plugin.inc
|
||||||
|
-- source include/not_valgrind.inc
|
||||||
|
|
||||||
#display current value of innodb_use_sys_malloc
|
#display current value of innodb_use_sys_malloc
|
||||||
SELECT @@GLOBAL.innodb_use_sys_malloc;
|
SELECT @@GLOBAL.innodb_use_sys_malloc;
|
||||||
|
@ -117,13 +117,14 @@ Database: information_schema
|
|||||||
| INNODB_TRX |
|
| INNODB_TRX |
|
||||||
| INNODB_SYS_TABLES |
|
| INNODB_SYS_TABLES |
|
||||||
| INNODB_LOCK_WAITS |
|
| INNODB_LOCK_WAITS |
|
||||||
| INNODB_CMPMEM_RESET |
|
| INNODB_SYS_STATS |
|
||||||
| INNODB_LOCKS |
|
| INNODB_LOCKS |
|
||||||
| INNODB_CMPMEM |
|
| INNODB_CMPMEM |
|
||||||
| INNODB_TABLE_STATS |
|
| INNODB_TABLE_STATS |
|
||||||
| INNODB_SYS_INDEXES |
|
| INNODB_SYS_INDEXES |
|
||||||
| INNODB_CMP_RESET |
|
| INNODB_CMP_RESET |
|
||||||
| INNODB_BUFFER_POOL_PAGES_BLOB |
|
| INNODB_BUFFER_POOL_PAGES_BLOB |
|
||||||
|
| INNODB_CMPMEM_RESET |
|
||||||
| INNODB_INDEX_STATS |
|
| INNODB_INDEX_STATS |
|
||||||
+---------------------------------------+
|
+---------------------------------------+
|
||||||
Database: INFORMATION_SCHEMA
|
Database: INFORMATION_SCHEMA
|
||||||
@ -168,13 +169,14 @@ Database: INFORMATION_SCHEMA
|
|||||||
| INNODB_TRX |
|
| INNODB_TRX |
|
||||||
| INNODB_SYS_TABLES |
|
| INNODB_SYS_TABLES |
|
||||||
| INNODB_LOCK_WAITS |
|
| INNODB_LOCK_WAITS |
|
||||||
| INNODB_CMPMEM_RESET |
|
| INNODB_SYS_STATS |
|
||||||
| INNODB_LOCKS |
|
| INNODB_LOCKS |
|
||||||
| INNODB_CMPMEM |
|
| INNODB_CMPMEM |
|
||||||
| INNODB_TABLE_STATS |
|
| INNODB_TABLE_STATS |
|
||||||
| INNODB_SYS_INDEXES |
|
| INNODB_SYS_INDEXES |
|
||||||
| INNODB_CMP_RESET |
|
| INNODB_CMP_RESET |
|
||||||
| INNODB_BUFFER_POOL_PAGES_BLOB |
|
| INNODB_BUFFER_POOL_PAGES_BLOB |
|
||||||
|
| INNODB_CMPMEM_RESET |
|
||||||
| INNODB_INDEX_STATS |
|
| INNODB_INDEX_STATS |
|
||||||
+---------------------------------------+
|
+---------------------------------------+
|
||||||
Wildcard: inf_rmation_schema
|
Wildcard: inf_rmation_schema
|
||||||
|
@ -8,6 +8,15 @@ percona_query_cache_with_comments_prepared_statements: Feature not merged int
|
|||||||
percona_show_temp_tables: Feature not merged into MariaDB
|
percona_show_temp_tables: Feature not merged into MariaDB
|
||||||
percona_slow_query_log-use_global_long_query_time: Feature not merged into MariaDB
|
percona_slow_query_log-use_global_long_query_time: Feature not merged into MariaDB
|
||||||
percona_query_cache_with_comments_disable: Feature not merged into MariaDB
|
percona_query_cache_with_comments_disable: Feature not merged into MariaDB
|
||||||
|
percona_log_connection_error: Feature not merged into MariaDB
|
||||||
|
percona_query_response_time: Feature not merged into MariaDB
|
||||||
|
percona_query_response_time-stored: Feature not merged into MariaDB
|
||||||
|
percona_sql_no_fcache: Feature not merged into MariaDB
|
||||||
|
percona_status_wait_query_cache_mutex: Feature not merged into MariaDB
|
||||||
|
percona_slave_innodb_stats: Feature not merged into MariaDB
|
||||||
|
percona_query_response_time-replication: Feature not merged into MariaDB
|
||||||
|
percona_server_variables: Feature not merged into MariaDB
|
||||||
|
|
||||||
percona_slow_query_log-log_slow_verbosity: InnoDB filtering information not fully merged into MariaDB
|
percona_slow_query_log-log_slow_verbosity: InnoDB filtering information not fully merged into MariaDB
|
||||||
|
|
||||||
|
percona_innodb_buffer_pool_shm: Requires big shmmax not default on many systems
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
--innodb_buffer_pool_shm_key=123456
|
@ -0,0 +1,6 @@
|
|||||||
|
show variables like 'innodb_buffer_pool_shm%';
|
||||||
|
Variable_name Value
|
||||||
|
innodb_buffer_pool_shm_key 123456
|
||||||
|
show variables like 'innodb_buffer_pool_shm%';
|
||||||
|
Variable_name Value
|
||||||
|
innodb_buffer_pool_shm_key 123456
|
18
mysql-test/suite/percona/percona_innodb_buffer_pool_shm.test
Normal file
18
mysql-test/suite/percona/percona_innodb_buffer_pool_shm.test
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
--source include/have_innodb.inc
|
||||||
|
show variables like 'innodb_buffer_pool_shm%';
|
||||||
|
|
||||||
|
#clean shutdown (restart_mysqld.inc is not clean if over 10 sec...)
|
||||||
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
|
wait
|
||||||
|
EOF
|
||||||
|
shutdown_server 120;
|
||||||
|
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
|
restart
|
||||||
|
EOF
|
||||||
|
--enable_reconnect
|
||||||
|
--source include/wait_until_connected_again.inc
|
||||||
|
--disable_reconnect
|
||||||
|
|
||||||
|
show variables like 'innodb_buffer_pool_shm%';
|
||||||
|
--sleep 1
|
||||||
|
--system ipcrm -M 123456
|
@ -0,0 +1 @@
|
|||||||
|
--innodb_use_sys_stats_table
|
@ -0,0 +1,3 @@
|
|||||||
|
show variables like 'innodb_use_sys_stats%';
|
||||||
|
Variable_name Value
|
||||||
|
innodb_use_sys_stats_table ON
|
@ -0,0 +1,2 @@
|
|||||||
|
--source include/have_innodb.inc
|
||||||
|
show variables like 'innodb_use_sys_stats%';
|
@ -0,0 +1 @@
|
|||||||
|
--log-error
|
15
mysql-test/suite/percona/percona_log_connection_error.result
Normal file
15
mysql-test/suite/percona/percona_log_connection_error.result
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
SET @old_max_connections = @@max_connections;
|
||||||
|
SET @old_log_warnings = @@log_warnings;
|
||||||
|
SET GLOBAL max_connections=2;
|
||||||
|
SET GLOBAL LOG_WARNINGS = 0;
|
||||||
|
connect(localhost,root,,test,port,socket);
|
||||||
|
ERROR HY000: Too many connections
|
||||||
|
SET GLOBAL LOG_WARNINGS = 1;
|
||||||
|
connect(localhost,root,,test,port,socket);
|
||||||
|
ERROR HY000: Too many connections
|
||||||
|
SET GLOBAL LOG_WARNINGS = 0;
|
||||||
|
connect(localhost,root,,test,port,socket);
|
||||||
|
ERROR HY000: Too many connections
|
||||||
|
SET GLOBAL max_connections = @old_max_connections;
|
||||||
|
SET GLOBAL log_warnings = @old_log_warnings;
|
||||||
|
1
|
52
mysql-test/suite/percona/percona_log_connection_error.test
Normal file
52
mysql-test/suite/percona/percona_log_connection_error.test
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
--source include/not_embedded.inc
|
||||||
|
|
||||||
|
connect (main,localhost,root,,);
|
||||||
|
connection main;
|
||||||
|
SET @old_max_connections = @@max_connections;
|
||||||
|
SET @old_log_warnings = @@log_warnings;
|
||||||
|
SET GLOBAL max_connections=2;
|
||||||
|
let $port=`SELECT Variable_value FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name LIKE 'port'`;
|
||||||
|
let $socket=`SELECT Variable_value FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE Variable_name LIKE 'socket'`;
|
||||||
|
|
||||||
|
SET GLOBAL LOG_WARNINGS = 0;
|
||||||
|
--connect (conn0,localhost,root,,)
|
||||||
|
connection conn0;
|
||||||
|
replace_result $port port $socket socket;
|
||||||
|
--error 1040
|
||||||
|
--connect(conn1,localhost,root,,)
|
||||||
|
disconnect conn0;
|
||||||
|
SLEEP 0.1; # tsarev: hack, but i don't know (and didn't find) how right
|
||||||
|
|
||||||
|
connection main;
|
||||||
|
SET GLOBAL LOG_WARNINGS = 1;
|
||||||
|
--connect (conn1,localhost,root,,)
|
||||||
|
replace_result $port port $socket socket;
|
||||||
|
--error 1040
|
||||||
|
--connect (conn0,localhost,root,,)
|
||||||
|
disconnect conn1;
|
||||||
|
SLEEP 0.1; # tsarev: hack, but i don't know (and didn't find) how right
|
||||||
|
|
||||||
|
connection main;
|
||||||
|
SET GLOBAL LOG_WARNINGS = 0;
|
||||||
|
--connect (conn0,localhost,root,,)
|
||||||
|
replace_result $port port $socket socket;
|
||||||
|
--error 1040
|
||||||
|
--connect(conn1,localhost,root,,)
|
||||||
|
disconnect conn0;
|
||||||
|
SLEEP 0.1; # tsarev: hack, but i don't know (and didn't find) how right
|
||||||
|
|
||||||
|
connection main;
|
||||||
|
SET GLOBAL max_connections = @old_max_connections;
|
||||||
|
SET GLOBAL log_warnings = @old_log_warnings;
|
||||||
|
let $log_error_= `SELECT @@GLOBAL.log_error`;
|
||||||
|
if(!`select LENGTH('$log_error_')`)
|
||||||
|
{
|
||||||
|
# MySQL Server on windows is started with --console and thus
|
||||||
|
# does not know the location of its .err log, use default location
|
||||||
|
let $log_error_ = $MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||||
|
}
|
||||||
|
# Assign env variable LOG_ERROR
|
||||||
|
let LOG_ERROR=$log_error_;
|
||||||
|
|
||||||
|
let cmd=cat $log_error | grep "Too many connections" | wc -l;
|
||||||
|
exec $cmd;
|
@ -0,0 +1,60 @@
|
|||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
reset master;
|
||||||
|
reset slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
start slave;
|
||||||
|
DROP TABLE IF EXISTS t;
|
||||||
|
CREATE TABLE t(id INT);
|
||||||
|
SELECT * from t;
|
||||||
|
id
|
||||||
|
SELECT * from t;
|
||||||
|
id
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect query_response_time_range_base value: '1'
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 2
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 10
|
||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON;
|
||||||
|
INSERT INTO t VALUES(0);
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
|
||||||
|
0
|
||||||
|
INSERT INTO t VALUES(1);
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
|
||||||
|
0
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
|
||||||
|
2
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
|
||||||
|
3
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 2
|
||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
||||||
|
INSERT INTO t VALUES(0);
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
|
||||||
|
0
|
||||||
|
INSERT INTO t VALUES(1);
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
|
||||||
|
0
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
|
||||||
|
2
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count)
|
||||||
|
3
|
||||||
|
DROP TABLE IF EXISTS t;
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF;
|
@ -0,0 +1,52 @@
|
|||||||
|
--source include/master-slave.inc
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
-- disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t;
|
||||||
|
-- enable_warnings
|
||||||
|
CREATE TABLE t(id INT);
|
||||||
|
SELECT * from t;
|
||||||
|
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
connection slave;
|
||||||
|
SELECT * from t;
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
source include/percona_query_response_time_flush.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=ON;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
INSERT INTO t VALUES(0);
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
INSERT INTO t VALUES(1);
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
connection slave;
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
source include/percona_query_response_time_flush.inc;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
INSERT INTO t VALUES(0);
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
INSERT INTO t VALUES(1);
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
connection slave;
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
SELECT SUM(INFORMATION_SCHEMA.QUERY_RESPONSE_TIME.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
DROP TABLE IF EXISTS t;
|
||||||
|
sync_slave_with_master;
|
||||||
|
connection slave;
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=OFF;
|
@ -0,0 +1,310 @@
|
|||||||
|
CREATE FUNCTION test_f()
|
||||||
|
RETURNS CHAR(30) DETERMINISTIC
|
||||||
|
BEGIN
|
||||||
|
DECLARE first VARCHAR(5);
|
||||||
|
DECLARE second VARCHAR(5);
|
||||||
|
DECLARE result VARCHAR(20);
|
||||||
|
SELECT SLEEP(1.11) INTO first;
|
||||||
|
SET first= 'Hello';
|
||||||
|
SET second=', ';
|
||||||
|
SET result= CONCAT(first,second);
|
||||||
|
SET result= CONCAT(result,'world!');
|
||||||
|
RETURN result;
|
||||||
|
END/
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect query_response_time_range_base value: '1'
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 2
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 2
|
||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
count query_count not_zero_region_count region_count
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
region_count
|
||||||
|
44
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
time
|
||||||
|
0.000001
|
||||||
|
0.000003
|
||||||
|
0.000007
|
||||||
|
0.000015
|
||||||
|
0.000030
|
||||||
|
0.000061
|
||||||
|
0.000122
|
||||||
|
0.000244
|
||||||
|
0.000488
|
||||||
|
0.000976
|
||||||
|
0.001953
|
||||||
|
0.003906
|
||||||
|
0.007812
|
||||||
|
0.015625
|
||||||
|
0.031250
|
||||||
|
0.062500
|
||||||
|
0.125000
|
||||||
|
0.250000
|
||||||
|
0.500000
|
||||||
|
1.000000
|
||||||
|
2.000000
|
||||||
|
4.000000
|
||||||
|
8.000000
|
||||||
|
16.000000
|
||||||
|
32.000000
|
||||||
|
64.000000
|
||||||
|
128.000000
|
||||||
|
256.000000
|
||||||
|
512.000000
|
||||||
|
1024.000000
|
||||||
|
2048.000000
|
||||||
|
4096.000000
|
||||||
|
8192.000000
|
||||||
|
16384.000000
|
||||||
|
32768.000000
|
||||||
|
65536.000000
|
||||||
|
131072.000000
|
||||||
|
262144.000000
|
||||||
|
524288.000000
|
||||||
|
1048576.00000
|
||||||
|
2097152.00000
|
||||||
|
4194304.00000
|
||||||
|
8388608.00000
|
||||||
|
TOO LONG QUERY
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT test_f();
|
||||||
|
test_f()
|
||||||
|
Hello, world!
|
||||||
|
SELECT test_f();
|
||||||
|
test_f()
|
||||||
|
Hello, world!
|
||||||
|
SELECT test_f();
|
||||||
|
test_f()
|
||||||
|
Hello, world!
|
||||||
|
SELECT test_f();
|
||||||
|
test_f()
|
||||||
|
Hello, world!
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
count query_count not_zero_region_count region_count
|
||||||
|
1 5 2 44
|
||||||
|
4 5 2 44
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
region_count
|
||||||
|
44
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
time
|
||||||
|
0.000001
|
||||||
|
0.000003
|
||||||
|
0.000007
|
||||||
|
0.000015
|
||||||
|
0.000030
|
||||||
|
0.000061
|
||||||
|
0.000122
|
||||||
|
0.000244
|
||||||
|
0.000488
|
||||||
|
0.000976
|
||||||
|
0.001953
|
||||||
|
0.003906
|
||||||
|
0.007812
|
||||||
|
0.015625
|
||||||
|
0.031250
|
||||||
|
0.062500
|
||||||
|
0.125000
|
||||||
|
0.250000
|
||||||
|
0.500000
|
||||||
|
1.000000
|
||||||
|
2.000000
|
||||||
|
4.000000
|
||||||
|
8.000000
|
||||||
|
16.000000
|
||||||
|
32.000000
|
||||||
|
64.000000
|
||||||
|
128.000000
|
||||||
|
256.000000
|
||||||
|
512.000000
|
||||||
|
1024.000000
|
||||||
|
2048.000000
|
||||||
|
4096.000000
|
||||||
|
8192.000000
|
||||||
|
16384.000000
|
||||||
|
32768.000000
|
||||||
|
65536.000000
|
||||||
|
131072.000000
|
||||||
|
262144.000000
|
||||||
|
524288.000000
|
||||||
|
1048576.00000
|
||||||
|
2097152.00000
|
||||||
|
4194304.00000
|
||||||
|
8388608.00000
|
||||||
|
TOO LONG QUERY
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 2
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 10
|
||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT test_f();
|
||||||
|
test_f()
|
||||||
|
Hello, world!
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
count query_count not_zero_region_count region_count
|
||||||
|
1 2 2 14
|
||||||
|
1 2 2 14
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
region_count
|
||||||
|
14
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
time
|
||||||
|
0.000001
|
||||||
|
0.000010
|
||||||
|
0.000100
|
||||||
|
0.001000
|
||||||
|
0.010000
|
||||||
|
0.100000
|
||||||
|
1.000000
|
||||||
|
10.000000
|
||||||
|
100.000000
|
||||||
|
1000.000000
|
||||||
|
10000.000000
|
||||||
|
100000.000000
|
||||||
|
1000000.00000
|
||||||
|
TOO LONG QUERY
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 10
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 7
|
||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT test_f();
|
||||||
|
test_f()
|
||||||
|
Hello, world!
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
count query_count not_zero_region_count region_count
|
||||||
|
1 2 2 17
|
||||||
|
1 2 2 17
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
region_count
|
||||||
|
17
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
time
|
||||||
|
0.000001
|
||||||
|
0.000008
|
||||||
|
0.000059
|
||||||
|
0.000416
|
||||||
|
0.002915
|
||||||
|
0.020408
|
||||||
|
0.142857
|
||||||
|
1.000000
|
||||||
|
7.000000
|
||||||
|
49.000000
|
||||||
|
343.000000
|
||||||
|
2401.000000
|
||||||
|
16807.000000
|
||||||
|
117649.000000
|
||||||
|
823543.000000
|
||||||
|
5764801.00000
|
||||||
|
TOO LONG QUERY
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 7
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 156
|
||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT test_f();
|
||||||
|
test_f()
|
||||||
|
Hello, world!
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
count query_count not_zero_region_count region_count
|
||||||
|
1 2 2 7
|
||||||
|
1 2 2 7
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
region_count
|
||||||
|
7
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
time
|
||||||
|
0.000041
|
||||||
|
0.006410
|
||||||
|
1.000000
|
||||||
|
156.000000
|
||||||
|
24336.000000
|
||||||
|
3796416.00000
|
||||||
|
TOO LONG QUERY
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 156
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 1000
|
||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT test_f();
|
||||||
|
test_f()
|
||||||
|
Hello, world!
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
count query_count not_zero_region_count region_count
|
||||||
|
1 2 2 6
|
||||||
|
1 2 2 6
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
region_count
|
||||||
|
6
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
time
|
||||||
|
0.000001
|
||||||
|
0.001000
|
||||||
|
1.000000
|
||||||
|
1000.000000
|
||||||
|
1000000.00000
|
||||||
|
TOO LONG QUERY
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 1000
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect query_response_time_range_base value: '1001'
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 1000
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10;
|
||||||
|
DROP FUNCTION test_f;
|
@ -0,0 +1,87 @@
|
|||||||
|
source include/have_innodb.inc;
|
||||||
|
|
||||||
|
delimiter /;
|
||||||
|
CREATE FUNCTION test_f()
|
||||||
|
RETURNS CHAR(30) DETERMINISTIC
|
||||||
|
BEGIN
|
||||||
|
DECLARE first VARCHAR(5);
|
||||||
|
DECLARE second VARCHAR(5);
|
||||||
|
DECLARE result VARCHAR(20);
|
||||||
|
SELECT SLEEP(1.11) INTO first;
|
||||||
|
SET first= 'Hello';
|
||||||
|
SET second=', ';
|
||||||
|
SET result= CONCAT(first,second);
|
||||||
|
SET result= CONCAT(result,'world!');
|
||||||
|
RETURN result;
|
||||||
|
END/
|
||||||
|
delimiter ;/
|
||||||
|
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
|
||||||
|
source include/percona_query_response_time_flush.inc;
|
||||||
|
source include/percona_query_response_time_show.inc;
|
||||||
|
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT test_f();
|
||||||
|
SELECT test_f();
|
||||||
|
SELECT test_f();
|
||||||
|
SELECT test_f();
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
|
||||||
|
source include/percona_query_response_time_show.inc;
|
||||||
|
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
|
||||||
|
source include/percona_query_response_time_flush.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT test_f();
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
|
||||||
|
source include/percona_query_response_time_show.inc;
|
||||||
|
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
|
||||||
|
source include/percona_query_response_time_flush.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT test_f();
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
|
||||||
|
source include/percona_query_response_time_show.inc;
|
||||||
|
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
|
||||||
|
source include/percona_query_response_time_flush.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT test_f();
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
|
||||||
|
source include/percona_query_response_time_show.inc;
|
||||||
|
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
|
||||||
|
source include/percona_query_response_time_flush.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT test_f();
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
|
||||||
|
source include/percona_query_response_time_show.inc;
|
||||||
|
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10;
|
||||||
|
|
||||||
|
DROP FUNCTION test_f;
|
564
mysql-test/suite/percona/percona_query_response_time.result
Normal file
564
mysql-test/suite/percona/percona_query_response_time.result
Normal file
@ -0,0 +1,564 @@
|
|||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect query_response_time_range_base value: '1'
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 2
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 2
|
||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
count query_count not_zero_region_count region_count
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
region_count
|
||||||
|
44
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
time
|
||||||
|
0.000001
|
||||||
|
0.000003
|
||||||
|
0.000007
|
||||||
|
0.000015
|
||||||
|
0.000030
|
||||||
|
0.000061
|
||||||
|
0.000122
|
||||||
|
0.000244
|
||||||
|
0.000488
|
||||||
|
0.000976
|
||||||
|
0.001953
|
||||||
|
0.003906
|
||||||
|
0.007812
|
||||||
|
0.015625
|
||||||
|
0.031250
|
||||||
|
0.062500
|
||||||
|
0.125000
|
||||||
|
0.250000
|
||||||
|
0.500000
|
||||||
|
1.000000
|
||||||
|
2.000000
|
||||||
|
4.000000
|
||||||
|
8.000000
|
||||||
|
16.000000
|
||||||
|
32.000000
|
||||||
|
64.000000
|
||||||
|
128.000000
|
||||||
|
256.000000
|
||||||
|
512.000000
|
||||||
|
1024.000000
|
||||||
|
2048.000000
|
||||||
|
4096.000000
|
||||||
|
8192.000000
|
||||||
|
16384.000000
|
||||||
|
32768.000000
|
||||||
|
65536.000000
|
||||||
|
131072.000000
|
||||||
|
262144.000000
|
||||||
|
524288.000000
|
||||||
|
1048576.00000
|
||||||
|
2097152.00000
|
||||||
|
4194304.00000
|
||||||
|
8388608.00000
|
||||||
|
TOO LONG QUERY
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT SLEEP(0.31);
|
||||||
|
SLEEP(0.31)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.32);
|
||||||
|
SLEEP(0.32)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.33);
|
||||||
|
SLEEP(0.33)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.34);
|
||||||
|
SLEEP(0.34)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.35);
|
||||||
|
SLEEP(0.35)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.36);
|
||||||
|
SLEEP(0.36)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.37);
|
||||||
|
SLEEP(0.37)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.38);
|
||||||
|
SLEEP(0.38)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.39);
|
||||||
|
SLEEP(0.39)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.40);
|
||||||
|
SLEEP(0.40)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.1);
|
||||||
|
SLEEP(1.1)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.2);
|
||||||
|
SLEEP(1.2)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.3);
|
||||||
|
SLEEP(1.3)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.5);
|
||||||
|
SLEEP(1.5)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.4);
|
||||||
|
SLEEP(1.4)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.5);
|
||||||
|
SLEEP(0.5)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.1);
|
||||||
|
SLEEP(2.1)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.3);
|
||||||
|
SLEEP(2.3)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.5);
|
||||||
|
SLEEP(2.5)
|
||||||
|
0
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
count query_count not_zero_region_count region_count
|
||||||
|
1 20 5 44
|
||||||
|
10 20 5 44
|
||||||
|
1 20 5 44
|
||||||
|
5 20 5 44
|
||||||
|
3 20 5 44
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
region_count
|
||||||
|
44
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
time
|
||||||
|
0.000001
|
||||||
|
0.000003
|
||||||
|
0.000007
|
||||||
|
0.000015
|
||||||
|
0.000030
|
||||||
|
0.000061
|
||||||
|
0.000122
|
||||||
|
0.000244
|
||||||
|
0.000488
|
||||||
|
0.000976
|
||||||
|
0.001953
|
||||||
|
0.003906
|
||||||
|
0.007812
|
||||||
|
0.015625
|
||||||
|
0.031250
|
||||||
|
0.062500
|
||||||
|
0.125000
|
||||||
|
0.250000
|
||||||
|
0.500000
|
||||||
|
1.000000
|
||||||
|
2.000000
|
||||||
|
4.000000
|
||||||
|
8.000000
|
||||||
|
16.000000
|
||||||
|
32.000000
|
||||||
|
64.000000
|
||||||
|
128.000000
|
||||||
|
256.000000
|
||||||
|
512.000000
|
||||||
|
1024.000000
|
||||||
|
2048.000000
|
||||||
|
4096.000000
|
||||||
|
8192.000000
|
||||||
|
16384.000000
|
||||||
|
32768.000000
|
||||||
|
65536.000000
|
||||||
|
131072.000000
|
||||||
|
262144.000000
|
||||||
|
524288.000000
|
||||||
|
1048576.00000
|
||||||
|
2097152.00000
|
||||||
|
4194304.00000
|
||||||
|
8388608.00000
|
||||||
|
TOO LONG QUERY
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 2
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 10
|
||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT SLEEP(0.31);
|
||||||
|
SLEEP(0.31)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.32);
|
||||||
|
SLEEP(0.32)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.33);
|
||||||
|
SLEEP(0.33)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.34);
|
||||||
|
SLEEP(0.34)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.35);
|
||||||
|
SLEEP(0.35)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.36);
|
||||||
|
SLEEP(0.36)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.37);
|
||||||
|
SLEEP(0.37)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.38);
|
||||||
|
SLEEP(0.38)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.39);
|
||||||
|
SLEEP(0.39)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.40);
|
||||||
|
SLEEP(0.40)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.1);
|
||||||
|
SLEEP(1.1)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.2);
|
||||||
|
SLEEP(1.2)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.3);
|
||||||
|
SLEEP(1.3)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.5);
|
||||||
|
SLEEP(1.5)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.4);
|
||||||
|
SLEEP(1.4)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.5);
|
||||||
|
SLEEP(0.5)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.1);
|
||||||
|
SLEEP(2.1)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.3);
|
||||||
|
SLEEP(2.3)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.5);
|
||||||
|
SLEEP(2.5)
|
||||||
|
0
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
count query_count not_zero_region_count region_count
|
||||||
|
1 20 3 14
|
||||||
|
11 20 3 14
|
||||||
|
8 20 3 14
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
region_count
|
||||||
|
14
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
time
|
||||||
|
0.000001
|
||||||
|
0.000010
|
||||||
|
0.000100
|
||||||
|
0.001000
|
||||||
|
0.010000
|
||||||
|
0.100000
|
||||||
|
1.000000
|
||||||
|
10.000000
|
||||||
|
100.000000
|
||||||
|
1000.000000
|
||||||
|
10000.000000
|
||||||
|
100000.000000
|
||||||
|
1000000.00000
|
||||||
|
TOO LONG QUERY
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 10
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 7
|
||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT SLEEP(0.31);
|
||||||
|
SLEEP(0.31)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.32);
|
||||||
|
SLEEP(0.32)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.33);
|
||||||
|
SLEEP(0.33)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.34);
|
||||||
|
SLEEP(0.34)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.35);
|
||||||
|
SLEEP(0.35)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.36);
|
||||||
|
SLEEP(0.36)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.37);
|
||||||
|
SLEEP(0.37)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.38);
|
||||||
|
SLEEP(0.38)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.39);
|
||||||
|
SLEEP(0.39)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.40);
|
||||||
|
SLEEP(0.40)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.1);
|
||||||
|
SLEEP(1.1)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.2);
|
||||||
|
SLEEP(1.2)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.3);
|
||||||
|
SLEEP(1.3)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.5);
|
||||||
|
SLEEP(1.5)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.4);
|
||||||
|
SLEEP(1.4)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.5);
|
||||||
|
SLEEP(0.5)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.1);
|
||||||
|
SLEEP(2.1)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.3);
|
||||||
|
SLEEP(2.3)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.5);
|
||||||
|
SLEEP(2.5)
|
||||||
|
0
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
count query_count not_zero_region_count region_count
|
||||||
|
1 20 3 17
|
||||||
|
11 20 3 17
|
||||||
|
8 20 3 17
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
region_count
|
||||||
|
17
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
time
|
||||||
|
0.000001
|
||||||
|
0.000008
|
||||||
|
0.000059
|
||||||
|
0.000416
|
||||||
|
0.002915
|
||||||
|
0.020408
|
||||||
|
0.142857
|
||||||
|
1.000000
|
||||||
|
7.000000
|
||||||
|
49.000000
|
||||||
|
343.000000
|
||||||
|
2401.000000
|
||||||
|
16807.000000
|
||||||
|
117649.000000
|
||||||
|
823543.000000
|
||||||
|
5764801.00000
|
||||||
|
TOO LONG QUERY
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 7
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 156
|
||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT SLEEP(0.31);
|
||||||
|
SLEEP(0.31)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.32);
|
||||||
|
SLEEP(0.32)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.33);
|
||||||
|
SLEEP(0.33)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.34);
|
||||||
|
SLEEP(0.34)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.35);
|
||||||
|
SLEEP(0.35)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.36);
|
||||||
|
SLEEP(0.36)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.37);
|
||||||
|
SLEEP(0.37)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.38);
|
||||||
|
SLEEP(0.38)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.39);
|
||||||
|
SLEEP(0.39)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.40);
|
||||||
|
SLEEP(0.40)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.1);
|
||||||
|
SLEEP(1.1)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.2);
|
||||||
|
SLEEP(1.2)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.3);
|
||||||
|
SLEEP(1.3)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.5);
|
||||||
|
SLEEP(1.5)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.4);
|
||||||
|
SLEEP(1.4)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.5);
|
||||||
|
SLEEP(0.5)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.1);
|
||||||
|
SLEEP(2.1)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.3);
|
||||||
|
SLEEP(2.3)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.5);
|
||||||
|
SLEEP(2.5)
|
||||||
|
0
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
count query_count not_zero_region_count region_count
|
||||||
|
1 20 3 7
|
||||||
|
11 20 3 7
|
||||||
|
8 20 3 7
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
region_count
|
||||||
|
7
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
time
|
||||||
|
0.000041
|
||||||
|
0.006410
|
||||||
|
1.000000
|
||||||
|
156.000000
|
||||||
|
24336.000000
|
||||||
|
3796416.00000
|
||||||
|
TOO LONG QUERY
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 156
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 1000
|
||||||
|
FLUSH QUERY_RESPONSE_TIME;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
SELECT SLEEP(0.31);
|
||||||
|
SLEEP(0.31)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.32);
|
||||||
|
SLEEP(0.32)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.33);
|
||||||
|
SLEEP(0.33)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.34);
|
||||||
|
SLEEP(0.34)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.35);
|
||||||
|
SLEEP(0.35)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.36);
|
||||||
|
SLEEP(0.36)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.37);
|
||||||
|
SLEEP(0.37)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.38);
|
||||||
|
SLEEP(0.38)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.39);
|
||||||
|
SLEEP(0.39)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.40);
|
||||||
|
SLEEP(0.40)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.1);
|
||||||
|
SLEEP(1.1)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.2);
|
||||||
|
SLEEP(1.2)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.3);
|
||||||
|
SLEEP(1.3)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.5);
|
||||||
|
SLEEP(1.5)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(1.4);
|
||||||
|
SLEEP(1.4)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(0.5);
|
||||||
|
SLEEP(0.5)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.1);
|
||||||
|
SLEEP(2.1)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.3);
|
||||||
|
SLEEP(2.3)
|
||||||
|
0
|
||||||
|
SELECT SLEEP(2.5);
|
||||||
|
SLEEP(2.5)
|
||||||
|
0
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SELECT c.count,
|
||||||
|
(SELECT SUM(a.count) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as a WHERE a.count != 0) as query_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as b WHERE b.count != 0) as not_zero_region_count,
|
||||||
|
(SELECT COUNT(*) FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME) as region_count
|
||||||
|
FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME as c WHERE c.count > 0;
|
||||||
|
count query_count not_zero_region_count region_count
|
||||||
|
1 20 3 6
|
||||||
|
11 20 3 6
|
||||||
|
8 20 3 6
|
||||||
|
SELECT COUNT(*) as region_count FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
region_count
|
||||||
|
6
|
||||||
|
SELECT time FROM INFORMATION_SCHEMA.QUERY_RESPONSE_TIME;
|
||||||
|
time
|
||||||
|
0.000001
|
||||||
|
0.001000
|
||||||
|
1.000000
|
||||||
|
1000.000000
|
||||||
|
1000000.00000
|
||||||
|
TOO LONG QUERY
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 1000
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect query_response_time_range_base value: '1001'
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
Variable_name Value
|
||||||
|
query_response_time_range_base 1000
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10;
|
65
mysql-test/suite/percona/percona_query_response_time.test
Normal file
65
mysql-test/suite/percona/percona_query_response_time.test
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
source include/have_innodb.inc;
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 2;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
|
||||||
|
source include/percona_query_response_time_flush.inc;
|
||||||
|
source include/percona_query_response_time_show.inc;
|
||||||
|
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
source include/percona_query_response_time_sleep.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
|
||||||
|
source include/percona_query_response_time_show.inc;
|
||||||
|
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 10;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
|
||||||
|
source include/percona_query_response_time_flush.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
source include/percona_query_response_time_sleep.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
|
||||||
|
source include/percona_query_response_time_show.inc;
|
||||||
|
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 7;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
|
||||||
|
source include/percona_query_response_time_flush.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
source include/percona_query_response_time_sleep.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
|
||||||
|
source include/percona_query_response_time_show.inc;
|
||||||
|
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 156;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
|
||||||
|
source include/percona_query_response_time_flush.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
source include/percona_query_response_time_sleep.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
|
||||||
|
source include/percona_query_response_time_show.inc;
|
||||||
|
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1000;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
|
||||||
|
source include/percona_query_response_time_flush.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=1;
|
||||||
|
source include/percona_query_response_time_sleep.inc;
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
|
||||||
|
source include/percona_query_response_time_show.inc;
|
||||||
|
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE = 1001;
|
||||||
|
SHOW GLOBAL VARIABLES where Variable_name like 'QUERY_RESPONSE_TIME_RANGE_BASE';
|
||||||
|
|
||||||
|
SET GLOBAL ENABLE_QUERY_RESPONSE_TIME_STATS=0;
|
||||||
|
SET GLOBAL QUERY_RESPONSE_TIME_RANGE_BASE =10;
|
340
mysql-test/suite/percona/percona_server_variables.result
Normal file
340
mysql-test/suite/percona/percona_server_variables.result
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
show variables;
|
||||||
|
Variable_name Value
|
||||||
|
auto_increment_increment Value
|
||||||
|
auto_increment_offset Value
|
||||||
|
autocommit Value
|
||||||
|
automatic_sp_privileges Value
|
||||||
|
back_log Value
|
||||||
|
basedir Value
|
||||||
|
big_tables Value
|
||||||
|
binlog_cache_size Value
|
||||||
|
binlog_direct_non_transactional_updates Value
|
||||||
|
binlog_format Value
|
||||||
|
bulk_insert_buffer_size Value
|
||||||
|
character_set_client Value
|
||||||
|
character_set_connection Value
|
||||||
|
character_set_database Value
|
||||||
|
character_set_filesystem Value
|
||||||
|
character_set_results Value
|
||||||
|
character_set_server Value
|
||||||
|
character_set_system Value
|
||||||
|
character_sets_dir Value
|
||||||
|
collation_connection Value
|
||||||
|
collation_database Value
|
||||||
|
collation_server Value
|
||||||
|
completion_type Value
|
||||||
|
concurrent_insert Value
|
||||||
|
connect_timeout Value
|
||||||
|
datadir Value
|
||||||
|
date_format Value
|
||||||
|
datetime_format Value
|
||||||
|
debug Value
|
||||||
|
debug_sync Value
|
||||||
|
default_week_format Value
|
||||||
|
delay_key_write Value
|
||||||
|
delayed_insert_limit Value
|
||||||
|
delayed_insert_timeout Value
|
||||||
|
delayed_queue_size Value
|
||||||
|
div_precision_increment Value
|
||||||
|
enable_query_response_time_stats Value
|
||||||
|
engine_condition_pushdown Value
|
||||||
|
error_count Value
|
||||||
|
event_scheduler Value
|
||||||
|
expire_logs_days Value
|
||||||
|
fast_index_creation Value
|
||||||
|
flush Value
|
||||||
|
flush_time Value
|
||||||
|
foreign_key_checks Value
|
||||||
|
ft_boolean_syntax Value
|
||||||
|
ft_max_word_len Value
|
||||||
|
ft_min_word_len Value
|
||||||
|
ft_query_expansion_limit Value
|
||||||
|
ft_stopword_file Value
|
||||||
|
general_log Value
|
||||||
|
general_log_file Value
|
||||||
|
group_concat_max_len Value
|
||||||
|
have_community_features Value
|
||||||
|
have_compress Value
|
||||||
|
have_crypt Value
|
||||||
|
have_csv Value
|
||||||
|
have_dynamic_loading Value
|
||||||
|
have_geometry Value
|
||||||
|
have_innodb Value
|
||||||
|
have_ndbcluster Value
|
||||||
|
have_openssl Value
|
||||||
|
have_partitioning Value
|
||||||
|
have_query_cache Value
|
||||||
|
have_rtree_keys Value
|
||||||
|
have_ssl Value
|
||||||
|
have_symlink Value
|
||||||
|
hostname Value
|
||||||
|
identity Value
|
||||||
|
ignore_builtin_innodb Value
|
||||||
|
init_connect Value
|
||||||
|
init_file Value
|
||||||
|
init_slave Value
|
||||||
|
innodb_adaptive_checkpoint Value
|
||||||
|
innodb_adaptive_flushing Value
|
||||||
|
innodb_adaptive_hash_index Value
|
||||||
|
innodb_additional_mem_pool_size Value
|
||||||
|
innodb_autoextend_increment Value
|
||||||
|
innodb_autoinc_lock_mode Value
|
||||||
|
innodb_buffer_pool_shm_key Value
|
||||||
|
innodb_buffer_pool_size Value
|
||||||
|
innodb_change_buffering Value
|
||||||
|
innodb_checkpoint_age_target Value
|
||||||
|
innodb_checksums Value
|
||||||
|
innodb_commit_concurrency Value
|
||||||
|
innodb_concurrency_tickets Value
|
||||||
|
innodb_data_file_path Value
|
||||||
|
innodb_data_home_dir Value
|
||||||
|
innodb_dict_size_limit Value
|
||||||
|
innodb_doublewrite Value
|
||||||
|
innodb_doublewrite_file Value
|
||||||
|
innodb_enable_unsafe_group_commit Value
|
||||||
|
innodb_expand_import Value
|
||||||
|
innodb_extra_rsegments Value
|
||||||
|
innodb_extra_undoslots Value
|
||||||
|
innodb_fast_checksum Value
|
||||||
|
innodb_fast_recovery Value
|
||||||
|
innodb_fast_shutdown Value
|
||||||
|
innodb_file_format Value
|
||||||
|
innodb_file_format_check Value
|
||||||
|
innodb_file_per_table Value
|
||||||
|
innodb_flush_log_at_trx_commit Value
|
||||||
|
innodb_flush_log_at_trx_commit_session Value
|
||||||
|
innodb_flush_method Value
|
||||||
|
innodb_flush_neighbor_pages Value
|
||||||
|
innodb_force_recovery Value
|
||||||
|
innodb_ibuf_accel_rate Value
|
||||||
|
innodb_ibuf_active_contract Value
|
||||||
|
innodb_ibuf_max_size Value
|
||||||
|
innodb_io_capacity Value
|
||||||
|
innodb_lock_wait_timeout Value
|
||||||
|
innodb_locks_unsafe_for_binlog Value
|
||||||
|
innodb_log_buffer_size Value
|
||||||
|
innodb_log_file_size Value
|
||||||
|
innodb_log_files_in_group Value
|
||||||
|
innodb_log_group_home_dir Value
|
||||||
|
innodb_max_dirty_pages_pct Value
|
||||||
|
innodb_max_purge_lag Value
|
||||||
|
innodb_mirrored_log_groups Value
|
||||||
|
innodb_old_blocks_pct Value
|
||||||
|
innodb_old_blocks_time Value
|
||||||
|
innodb_open_files Value
|
||||||
|
innodb_overwrite_relay_log_info Value
|
||||||
|
innodb_page_size Value
|
||||||
|
innodb_pass_corrupt_table Value
|
||||||
|
innodb_read_ahead Value
|
||||||
|
innodb_read_ahead_threshold Value
|
||||||
|
innodb_read_io_threads Value
|
||||||
|
innodb_recovery_stats Value
|
||||||
|
innodb_replication_delay Value
|
||||||
|
innodb_rollback_on_timeout Value
|
||||||
|
innodb_show_locks_held Value
|
||||||
|
innodb_show_verbose_locks Value
|
||||||
|
innodb_spin_wait_delay Value
|
||||||
|
innodb_stats_auto_update Value
|
||||||
|
innodb_stats_method Value
|
||||||
|
innodb_stats_on_metadata Value
|
||||||
|
innodb_stats_sample_pages Value
|
||||||
|
innodb_stats_update_need_lock Value
|
||||||
|
innodb_strict_mode Value
|
||||||
|
innodb_support_xa Value
|
||||||
|
innodb_sync_spin_loops Value
|
||||||
|
innodb_table_locks Value
|
||||||
|
innodb_thread_concurrency Value
|
||||||
|
innodb_thread_concurrency_timer_based Value
|
||||||
|
innodb_thread_sleep_delay Value
|
||||||
|
innodb_use_purge_thread Value
|
||||||
|
innodb_use_sys_malloc Value
|
||||||
|
innodb_use_sys_stats_table Value
|
||||||
|
innodb_version Value
|
||||||
|
innodb_write_io_threads Value
|
||||||
|
insert_id Value
|
||||||
|
interactive_timeout Value
|
||||||
|
join_buffer_size Value
|
||||||
|
keep_files_on_create Value
|
||||||
|
key_buffer_size Value
|
||||||
|
key_cache_age_threshold Value
|
||||||
|
key_cache_block_size Value
|
||||||
|
key_cache_division_limit Value
|
||||||
|
language Value
|
||||||
|
large_files_support Value
|
||||||
|
large_page_size Value
|
||||||
|
large_pages Value
|
||||||
|
last_insert_id Value
|
||||||
|
lc_time_names Value
|
||||||
|
license Value
|
||||||
|
local_infile Value
|
||||||
|
locked_in_memory Value
|
||||||
|
log Value
|
||||||
|
log_bin Value
|
||||||
|
log_bin_trust_function_creators Value
|
||||||
|
log_bin_trust_routine_creators Value
|
||||||
|
log_error Value
|
||||||
|
log_output Value
|
||||||
|
log_queries_not_using_indexes Value
|
||||||
|
log_slave_updates Value
|
||||||
|
log_slow_filter Value
|
||||||
|
log_slow_queries Value
|
||||||
|
log_slow_rate_limit Value
|
||||||
|
log_slow_slave_statements Value
|
||||||
|
log_slow_sp_statements Value
|
||||||
|
log_slow_timestamp_every Value
|
||||||
|
log_slow_verbosity Value
|
||||||
|
log_warnings Value
|
||||||
|
long_query_time Value
|
||||||
|
low_priority_updates Value
|
||||||
|
lower_case_file_system Value
|
||||||
|
lower_case_table_names Value
|
||||||
|
max_allowed_packet Value
|
||||||
|
max_binlog_cache_size Value
|
||||||
|
max_binlog_size Value
|
||||||
|
max_connect_errors Value
|
||||||
|
max_connections Value
|
||||||
|
max_delayed_threads Value
|
||||||
|
max_error_count Value
|
||||||
|
max_heap_table_size Value
|
||||||
|
max_insert_delayed_threads Value
|
||||||
|
max_join_size Value
|
||||||
|
max_length_for_sort_data Value
|
||||||
|
max_prepared_stmt_count Value
|
||||||
|
max_relay_log_size Value
|
||||||
|
max_seeks_for_key Value
|
||||||
|
max_sort_length Value
|
||||||
|
max_sp_recursion_depth Value
|
||||||
|
max_tmp_tables Value
|
||||||
|
max_user_connections Value
|
||||||
|
max_write_lock_count Value
|
||||||
|
min_examined_row_limit Value
|
||||||
|
multi_range_count Value
|
||||||
|
myisam_data_pointer_size Value
|
||||||
|
myisam_max_sort_file_size Value
|
||||||
|
myisam_mmap_size Value
|
||||||
|
myisam_recover_options Value
|
||||||
|
myisam_repair_threads Value
|
||||||
|
myisam_sort_buffer_size Value
|
||||||
|
myisam_stats_method Value
|
||||||
|
myisam_use_mmap Value
|
||||||
|
net_buffer_length Value
|
||||||
|
net_read_timeout Value
|
||||||
|
net_retry_count Value
|
||||||
|
net_write_timeout Value
|
||||||
|
new Value
|
||||||
|
old Value
|
||||||
|
old_alter_table Value
|
||||||
|
old_passwords Value
|
||||||
|
open_files_limit Value
|
||||||
|
optimizer_fix Value
|
||||||
|
optimizer_prune_level Value
|
||||||
|
optimizer_search_depth Value
|
||||||
|
optimizer_switch Value
|
||||||
|
pid_file Value
|
||||||
|
plugin_dir Value
|
||||||
|
port Value
|
||||||
|
preload_buffer_size Value
|
||||||
|
profiling Value
|
||||||
|
profiling_history_size Value
|
||||||
|
profiling_server Value
|
||||||
|
profiling_use_getrusage Value
|
||||||
|
protocol_version Value
|
||||||
|
pseudo_thread_id Value
|
||||||
|
query_alloc_block_size Value
|
||||||
|
query_cache_limit Value
|
||||||
|
query_cache_min_res_unit Value
|
||||||
|
query_cache_size Value
|
||||||
|
query_cache_strip_comments Value
|
||||||
|
query_cache_type Value
|
||||||
|
query_cache_wlock_invalidate Value
|
||||||
|
query_prealloc_size Value
|
||||||
|
query_response_time_range_base Value
|
||||||
|
rand_seed1 Value
|
||||||
|
rand_seed2 Value
|
||||||
|
range_alloc_block_size Value
|
||||||
|
read_buffer_size Value
|
||||||
|
read_only Value
|
||||||
|
read_rnd_buffer_size Value
|
||||||
|
relay_log Value
|
||||||
|
relay_log_index Value
|
||||||
|
relay_log_info_file Value
|
||||||
|
relay_log_purge Value
|
||||||
|
relay_log_space_limit Value
|
||||||
|
report_host Value
|
||||||
|
report_password Value
|
||||||
|
report_port Value
|
||||||
|
report_user Value
|
||||||
|
rpl_recovery_rank Value
|
||||||
|
secure_auth Value
|
||||||
|
secure_file_priv Value
|
||||||
|
server_id Value
|
||||||
|
skip_external_locking Value
|
||||||
|
skip_name_resolve Value
|
||||||
|
skip_networking Value
|
||||||
|
skip_show_database Value
|
||||||
|
slave_compressed_protocol Value
|
||||||
|
slave_exec_mode Value
|
||||||
|
slave_load_tmpdir Value
|
||||||
|
slave_net_timeout Value
|
||||||
|
slave_skip_errors Value
|
||||||
|
slave_transaction_retries Value
|
||||||
|
slow_launch_time Value
|
||||||
|
slow_query_log Value
|
||||||
|
slow_query_log_file Value
|
||||||
|
slow_query_log_microseconds_timestamp Value
|
||||||
|
socket Value
|
||||||
|
sort_buffer_size Value
|
||||||
|
sql_auto_is_null Value
|
||||||
|
sql_big_selects Value
|
||||||
|
sql_big_tables Value
|
||||||
|
sql_buffer_result Value
|
||||||
|
sql_log_bin Value
|
||||||
|
sql_log_off Value
|
||||||
|
sql_log_update Value
|
||||||
|
sql_low_priority_updates Value
|
||||||
|
sql_max_join_size Value
|
||||||
|
sql_mode Value
|
||||||
|
sql_notes Value
|
||||||
|
sql_quote_show_create Value
|
||||||
|
sql_safe_updates Value
|
||||||
|
sql_select_limit Value
|
||||||
|
sql_slave_skip_counter Value
|
||||||
|
sql_warnings Value
|
||||||
|
ssl_ca Value
|
||||||
|
ssl_capath Value
|
||||||
|
ssl_cert Value
|
||||||
|
ssl_cipher Value
|
||||||
|
ssl_key Value
|
||||||
|
storage_engine Value
|
||||||
|
suppress_log_warning_1592 Value
|
||||||
|
sync_binlog Value
|
||||||
|
sync_frm Value
|
||||||
|
system_time_zone Value
|
||||||
|
table_definition_cache Value
|
||||||
|
table_lock_wait_timeout Value
|
||||||
|
table_open_cache Value
|
||||||
|
table_type Value
|
||||||
|
thread_cache_size Value
|
||||||
|
thread_handling Value
|
||||||
|
thread_stack Value
|
||||||
|
thread_statistics Value
|
||||||
|
time_format Value
|
||||||
|
time_zone Value
|
||||||
|
timed_mutexes Value
|
||||||
|
timestamp Value
|
||||||
|
tmp_table_size Value
|
||||||
|
tmpdir Value
|
||||||
|
transaction_alloc_block_size Value
|
||||||
|
transaction_prealloc_size Value
|
||||||
|
tx_isolation Value
|
||||||
|
unique_checks Value
|
||||||
|
updatable_views_with_limit Value
|
||||||
|
use_global_log_slow_control Value
|
||||||
|
use_global_long_query_time Value
|
||||||
|
userstat_running Value
|
||||||
|
version Value
|
||||||
|
version_comment Value
|
||||||
|
version_compile_machine Value
|
||||||
|
version_compile_os Value
|
||||||
|
wait_timeout Value
|
||||||
|
warning_count Value
|
7
mysql-test/suite/percona/percona_server_variables.test
Normal file
7
mysql-test/suite/percona/percona_server_variables.test
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_debug.inc
|
||||||
|
|
||||||
|
#check the list of variable names
|
||||||
|
--replace_column 2 Value
|
||||||
|
show variables;
|
||||||
|
|
@ -0,0 +1 @@
|
|||||||
|
--long_query_time=0 --log_slow_verbosity=innodb --log_slow_slave_statements
|
@ -0,0 +1 @@
|
|||||||
|
--long_query_time=0 --log_slow_verbosity=innodb --log_slow_slave_statements
|
21
mysql-test/suite/percona/percona_slave_innodb_stats.result
Normal file
21
mysql-test/suite/percona/percona_slave_innodb_stats.result
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
reset master;
|
||||||
|
reset slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
start slave;
|
||||||
|
DROP TABLE IF EXISTS t;
|
||||||
|
CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t VALUES
|
||||||
|
(1,"aaaaabbbbbcccccdddddeeeeefffff"),
|
||||||
|
(2,"aaaaabbbbbcccccdddddeeeeefffff"),
|
||||||
|
(3,"aaaaabbbbbcccccdddddeeeeefffff"),
|
||||||
|
(4,"aaaaabbbbbcccccdddddeeeeefffff"),
|
||||||
|
(5,"aaaaabbbbbcccccdddddeeeeefffff");
|
||||||
|
INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
|
||||||
|
INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
|
||||||
|
STOP SLAVE;
|
||||||
|
START SLAVE;
|
||||||
|
INSERT INTO t SELECT t.id,t.data from t;
|
||||||
|
DROP TABLE IF EXISTS t;
|
||||||
|
4
|
43
mysql-test/suite/percona/percona_slave_innodb_stats.test
Normal file
43
mysql-test/suite/percona/percona_slave_innodb_stats.test
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
source include/have_innodb.inc;
|
||||||
|
source include/master-slave.inc;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
-- disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t;
|
||||||
|
-- enable_warnings
|
||||||
|
CREATE TABLE t(id INT,data CHAR(30)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t VALUES
|
||||||
|
(1,"aaaaabbbbbcccccdddddeeeeefffff"),
|
||||||
|
(2,"aaaaabbbbbcccccdddddeeeeefffff"),
|
||||||
|
(3,"aaaaabbbbbcccccdddddeeeeefffff"),
|
||||||
|
(4,"aaaaabbbbbcccccdddddeeeeefffff"),
|
||||||
|
(5,"aaaaabbbbbcccccdddddeeeeefffff");
|
||||||
|
INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
|
||||||
|
INSERT INTO t SELECT t2.id,t2.data from t as t1, t as t2;
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
connection slave;
|
||||||
|
STOP SLAVE;
|
||||||
|
-- source include/wait_for_slave_to_stop.inc
|
||||||
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
||||||
|
wait
|
||||||
|
EOF
|
||||||
|
--shutdown_server 10
|
||||||
|
--source include/wait_until_disconnected.inc
|
||||||
|
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
||||||
|
restart
|
||||||
|
EOF
|
||||||
|
--enable_reconnect
|
||||||
|
--source include/wait_until_connected_again.inc
|
||||||
|
START SLAVE;
|
||||||
|
-- source include/wait_for_slave_to_start.inc
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
INSERT INTO t SELECT t.id,t.data from t;
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
DROP TABLE IF EXISTS t;
|
||||||
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
exec cat var/mysqld.2/mysqld-slow.log | grep InnoDB_IO_r_ops | wc -l;
|
@ -22,3 +22,38 @@ set global long_query_time=2;
|
|||||||
set global use_global_long_query_time=0;
|
set global use_global_long_query_time=0;
|
||||||
cat MYSQLD_DATADIR/percona_slow_query_log-use_global_long_query_time.log | grep -c Query_time
|
cat MYSQLD_DATADIR/percona_slow_query_log-use_global_long_query_time.log | grep -c Query_time
|
||||||
3
|
3
|
||||||
|
show global variables like 'use_global_log_slow_control';
|
||||||
|
Variable_name Value
|
||||||
|
use_global_log_slow_control none
|
||||||
|
show global variables like 'use_global_long_query_time';
|
||||||
|
Variable_name Value
|
||||||
|
use_global_long_query_time OFF
|
||||||
|
set global use_global_log_slow_control = long_query_time;
|
||||||
|
show global variables like 'use_global_log_slow_control';
|
||||||
|
Variable_name Value
|
||||||
|
use_global_log_slow_control long_query_time
|
||||||
|
show global variables like 'use_global_long_query_time';
|
||||||
|
Variable_name Value
|
||||||
|
use_global_long_query_time ON
|
||||||
|
set global use_global_log_slow_control = log_slow_filter;
|
||||||
|
show global variables like 'use_global_log_slow_control';
|
||||||
|
Variable_name Value
|
||||||
|
use_global_log_slow_control log_slow_filter
|
||||||
|
show global variables like 'use_global_long_query_time';
|
||||||
|
Variable_name Value
|
||||||
|
use_global_long_query_time OFF
|
||||||
|
set global use_global_long_query_time = ON;
|
||||||
|
show global variables like 'use_global_log_slow_control';
|
||||||
|
Variable_name Value
|
||||||
|
use_global_log_slow_control log_slow_filter,long_query_time
|
||||||
|
show global variables like 'use_global_long_query_time';
|
||||||
|
Variable_name Value
|
||||||
|
use_global_long_query_time ON
|
||||||
|
set global use_global_long_query_time = OFF;
|
||||||
|
show global variables like 'use_global_log_slow_control';
|
||||||
|
Variable_name Value
|
||||||
|
use_global_log_slow_control log_slow_filter
|
||||||
|
show global variables like 'use_global_long_query_time';
|
||||||
|
Variable_name Value
|
||||||
|
use_global_long_query_time OFF
|
||||||
|
set global use_global_log_slow_control = none;
|
||||||
|
@ -20,3 +20,24 @@ let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-use_global_long_query_time
|
|||||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||||
exec echo '$cmd';
|
exec echo '$cmd';
|
||||||
exec $cmd;
|
exec $cmd;
|
||||||
|
|
||||||
|
show global variables like 'use_global_log_slow_control';
|
||||||
|
show global variables like 'use_global_long_query_time';
|
||||||
|
|
||||||
|
set global use_global_log_slow_control = long_query_time;
|
||||||
|
show global variables like 'use_global_log_slow_control';
|
||||||
|
show global variables like 'use_global_long_query_time';
|
||||||
|
|
||||||
|
set global use_global_log_slow_control = log_slow_filter;
|
||||||
|
show global variables like 'use_global_log_slow_control';
|
||||||
|
show global variables like 'use_global_long_query_time';
|
||||||
|
|
||||||
|
set global use_global_long_query_time = ON;
|
||||||
|
show global variables like 'use_global_log_slow_control';
|
||||||
|
show global variables like 'use_global_long_query_time';
|
||||||
|
|
||||||
|
set global use_global_long_query_time = OFF;
|
||||||
|
show global variables like 'use_global_log_slow_control';
|
||||||
|
show global variables like 'use_global_long_query_time';
|
||||||
|
|
||||||
|
set global use_global_log_slow_control = none;
|
||||||
|
12
mysql-test/suite/percona/percona_sql_no_fcache.result
Normal file
12
mysql-test/suite/percona/percona_sql_no_fcache.result
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
drop table if exists t1;
|
||||||
|
create table t (a int not null);
|
||||||
|
insert into t values (1),(2),(3);
|
||||||
|
SELECT SQL_NO_FCACHE SLEEP(0);
|
||||||
|
SLEEP(0)
|
||||||
|
0
|
||||||
|
SELECT /*!40001 SQL_NO_CACHE */ /*!50084 SQL_NO_FCACHE */ * FROM t;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
DROP TABLE t;
|
11
mysql-test/suite/percona/percona_sql_no_fcache.test
Normal file
11
mysql-test/suite/percona/percona_sql_no_fcache.test
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--disable_warnings
|
||||||
|
drop table if exists t1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
create table t (a int not null);
|
||||||
|
insert into t values (1),(2),(3);
|
||||||
|
|
||||||
|
SELECT SQL_NO_FCACHE SLEEP(0);
|
||||||
|
SELECT /*!40001 SQL_NO_CACHE */ /*!50084 SQL_NO_FCACHE */ * FROM t;
|
||||||
|
|
||||||
|
DROP TABLE t;
|
@ -0,0 +1,27 @@
|
|||||||
|
set GLOBAL query_cache_size=1355776;
|
||||||
|
flush query cache;
|
||||||
|
flush query cache;
|
||||||
|
reset query cache;
|
||||||
|
flush status;
|
||||||
|
DROP TABLE IF EXISTS t;
|
||||||
|
CREATE TABLE t(id INT, number INT);
|
||||||
|
INSERT INTO t VALUES (0,1);
|
||||||
|
INSERT INTO t VALUES (1,2);
|
||||||
|
INSERT INTO t VALUES (2,3);
|
||||||
|
SELECT number from t where id > 0;
|
||||||
|
number
|
||||||
|
2
|
||||||
|
3
|
||||||
|
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
|
||||||
|
SELECT number from t where id > 0;
|
||||||
|
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
|
||||||
|
SELECT number from t where id > 0;
|
||||||
|
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
|
||||||
|
SHOW PROCESSLIST;
|
||||||
|
Id User Host db Command Time State Info
|
||||||
|
Id root localhost test Sleep Time NULL
|
||||||
|
Id root localhost test Query Time Waiting on query cache mutex SELECT number from t where id > 0
|
||||||
|
Id root localhost test Query Time Waiting on query cache mutex SELECT number from t where id > 0
|
||||||
|
Id root localhost test Query Time NULL SHOW PROCESSLIST
|
||||||
|
DROP TABLE t;
|
||||||
|
set GLOBAL query_cache_size=0;
|
@ -0,0 +1,37 @@
|
|||||||
|
--source include/have_query_cache.inc
|
||||||
|
--source include/have_debug.inc
|
||||||
|
set GLOBAL query_cache_size=1355776;
|
||||||
|
--source include/percona_query_cache_with_comments_clear.inc
|
||||||
|
|
||||||
|
-- disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t;
|
||||||
|
-- enable_warnings
|
||||||
|
CREATE TABLE t(id INT, number INT);
|
||||||
|
INSERT INTO t VALUES (0,1);
|
||||||
|
INSERT INTO t VALUES (1,2);
|
||||||
|
INSERT INTO t VALUES (2,3);
|
||||||
|
SELECT number from t where id > 0;
|
||||||
|
--connect (conn0,localhost,root,,)
|
||||||
|
--connect (conn1,localhost,root,,)
|
||||||
|
--connect (conn2,localhost,root,,)
|
||||||
|
|
||||||
|
--connection conn0
|
||||||
|
--error 0, ER_UNKNOWN_SYSTEM_VARIABLE
|
||||||
|
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
|
||||||
|
SEND SELECT number from t where id > 0;
|
||||||
|
SLEEP 1.0;
|
||||||
|
|
||||||
|
--connection conn1
|
||||||
|
--error 0, ER_UNKNOWN_SYSTEM_VARIABLE
|
||||||
|
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
|
||||||
|
SEND SELECT number from t where id > 0;
|
||||||
|
SLEEP 1.0;
|
||||||
|
|
||||||
|
--connection conn2
|
||||||
|
--error 0, ER_UNKNOWN_SYSTEM_VARIABLE
|
||||||
|
SET SESSION debug="+d,status_wait_query_cache_mutex_sleep";
|
||||||
|
--replace_column 1 Id 6 Time
|
||||||
|
SHOW PROCESSLIST;
|
||||||
|
|
||||||
|
DROP TABLE t;
|
||||||
|
set GLOBAL query_cache_size=0;
|
@ -22,15 +22,18 @@ CREATE PROCEDURE insert_many(p1 int)
|
|||||||
BEGIN
|
BEGIN
|
||||||
SET @x = 0;
|
SET @x = 0;
|
||||||
SET @y = 0;
|
SET @y = 0;
|
||||||
|
start transaction;
|
||||||
REPEAT
|
REPEAT
|
||||||
insert into test1 set b=1;
|
insert into test1 set b=1;
|
||||||
SET @x = @x + 1;
|
SET @x = @x + 1;
|
||||||
SET @y = @y + 1;
|
SET @y = @y + 1;
|
||||||
IF @y >= 1000 THEN
|
IF @y >= 1000 THEN
|
||||||
commit;
|
commit;
|
||||||
|
start transaction;
|
||||||
SET @y = 0;
|
SET @y = 0;
|
||||||
END IF;
|
END IF;
|
||||||
UNTIL @x >= p1 END REPEAT;
|
UNTIL @x >= p1 END REPEAT;
|
||||||
|
commit;
|
||||||
END|
|
END|
|
||||||
delimiter ;|
|
delimiter ;|
|
||||||
call insert_many(100000);
|
call insert_many(100000);
|
||||||
|
@ -1680,3 +1680,16 @@ SELECT * FROM t1;
|
|||||||
REPAIR TABLE t1 EXTENDED;
|
REPAIR TABLE t1 EXTENDED;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #47012 archive tables are not upgradeable, and server crashes on
|
||||||
|
# any access
|
||||||
|
#
|
||||||
|
copy_file std_data/archive_5_0.frm $MYSQLD_DATADIR/test/t1.frm;
|
||||||
|
copy_file std_data/archive_5_0.ARZ $MYSQLD_DATADIR/test/t1.ARZ;
|
||||||
|
copy_file std_data/archive_5_0.ARM $MYSQLD_DATADIR/test/t1.ARM;
|
||||||
|
--error ER_TABLE_NEEDS_UPGRADE
|
||||||
|
select * from t1;
|
||||||
|
repair table t1;
|
||||||
|
select sum(length(a)),sum(b) from t1;
|
||||||
|
drop table t1;
|
||||||
|
@ -1 +1 @@
|
|||||||
--skip-grant-tables --skip-name-resolve --safemalloc-mem-limit=20000000
|
--skip-grant-tables --skip-name-resolve --safemalloc-mem-limit=20000000 --loose-maria-pagecache-buffer-size=1M
|
||||||
|
@ -195,9 +195,10 @@ create table `#mysql50#abc``def` ( id int );
|
|||||||
--error ER_WRONG_TABLE_NAME
|
--error ER_WRONG_TABLE_NAME
|
||||||
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
|
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
|
||||||
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
|
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
|
||||||
create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
|
create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1234` (a int);
|
||||||
--error ER_WRONG_TABLE_NAME
|
--error ER_WRONG_TABLE_NAME
|
||||||
create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int);
|
create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa12345` (a int);
|
||||||
|
show tables;
|
||||||
use test;
|
use test;
|
||||||
drop database mysqltestbug26703;
|
drop database mysqltestbug26703;
|
||||||
|
|
||||||
|
@ -1541,7 +1541,7 @@ connect (con1,localhost,testbug,,db1);
|
|||||||
SELECT * FROM `../db2/tb2`;
|
SELECT * FROM `../db2/tb2`;
|
||||||
--error ER_TABLEACCESS_DENIED_ERROR
|
--error ER_TABLEACCESS_DENIED_ERROR
|
||||||
SELECT * FROM `../db2`.tb2;
|
SELECT * FROM `../db2`.tb2;
|
||||||
--error ER_NO_SUCH_TABLE
|
--error ER_WRONG_TABLE_NAME
|
||||||
SELECT * FROM `#mysql50#/../db2/tb2`;
|
SELECT * FROM `#mysql50#/../db2/tb2`;
|
||||||
connection default;
|
connection default;
|
||||||
disconnect con1;
|
disconnect con1;
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
# Some simple test of load data
|
# Some simple test of load data
|
||||||
#
|
#
|
||||||
|
|
||||||
|
-- source include/have_ucs2.inc
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop table if exists t1, t2;
|
drop table if exists t1, t2;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
@ -25,7 +25,7 @@ FLUSH TABLES;
|
|||||||
REPAIR TABLE test.bug49823;
|
REPAIR TABLE test.bug49823;
|
||||||
RENAME TABLE general_log TO renamed_general_log;
|
RENAME TABLE general_log TO renamed_general_log;
|
||||||
RENAME TABLE test.bug49823 TO general_log;
|
RENAME TABLE test.bug49823 TO general_log;
|
||||||
--exec $MYSQL_UPGRADE --skip-verbose --force 2>&1
|
--exec $MYSQL_UPGRADE --force 2>&1
|
||||||
DROP TABLE general_log;
|
DROP TABLE general_log;
|
||||||
RENAME TABLE renamed_general_log TO general_log;
|
RENAME TABLE renamed_general_log TO general_log;
|
||||||
SET GLOBAL general_log = @saved_general_log;
|
SET GLOBAL general_log = @saved_general_log;
|
||||||
|
@ -33,7 +33,7 @@ if (`SELECT $VALGRIND_TEST`)
|
|||||||
# expected binaries it uses.
|
# expected binaries it uses.
|
||||||
#
|
#
|
||||||
--echo Run mysql_upgrade once
|
--echo Run mysql_upgrade once
|
||||||
--exec $MYSQL_UPGRADE --skip-verbose --force 2>&1
|
--exec $MYSQL_UPGRADE --force 2>&1
|
||||||
|
|
||||||
# It should have created a file in the MySQL Servers datadir
|
# It should have created a file in the MySQL Servers datadir
|
||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||||
@ -42,13 +42,13 @@ file_exists $MYSQLD_DATADIR/mysql_upgrade_info;
|
|||||||
--echo Run it again - should say already completed
|
--echo Run it again - should say already completed
|
||||||
--replace_result $MYSQL_SERVER_VERSION VERSION
|
--replace_result $MYSQL_SERVER_VERSION VERSION
|
||||||
--error 1
|
--error 1
|
||||||
--exec $MYSQL_UPGRADE --skip-verbose 2>&1
|
--exec $MYSQL_UPGRADE 2>&1
|
||||||
|
|
||||||
# It should have created a file in the MySQL Servers datadir
|
# It should have created a file in the MySQL Servers datadir
|
||||||
file_exists $MYSQLD_DATADIR/mysql_upgrade_info;
|
file_exists $MYSQLD_DATADIR/mysql_upgrade_info;
|
||||||
|
|
||||||
--echo Force should run it regardless of wether it's been run before
|
--echo Force should run it regardless of wether it's been run before
|
||||||
--exec $MYSQL_UPGRADE --skip-verbose --force 2>&1
|
--exec $MYSQL_UPGRADE --force 2>&1
|
||||||
|
|
||||||
# It should have created a file in the MySQL Servers datadir
|
# It should have created a file in the MySQL Servers datadir
|
||||||
file_exists $MYSQLD_DATADIR/mysql_upgrade_info;
|
file_exists $MYSQLD_DATADIR/mysql_upgrade_info;
|
||||||
@ -63,7 +63,7 @@ file_exists $MYSQLD_DATADIR/mysql_upgrade_info;
|
|||||||
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
|
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
|
||||||
GRANT ALL ON *.* TO mysqltest1@'%';
|
GRANT ALL ON *.* TO mysqltest1@'%';
|
||||||
--echo Run mysql_upgrade with password protected account
|
--echo Run mysql_upgrade with password protected account
|
||||||
--exec $MYSQL_UPGRADE --skip-verbose --force --user=mysqltest1 --password=sakila 2>&1
|
--exec $MYSQL_UPGRADE --force --user=mysqltest1 --password=sakila 2>&1
|
||||||
|
|
||||||
DROP USER mysqltest1@'%';
|
DROP USER mysqltest1@'%';
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ DROP USER mysqltest1@'%';
|
|||||||
--replace_result $MYSQLTEST_VARDIR var
|
--replace_result $MYSQLTEST_VARDIR var
|
||||||
--replace_regex /.*mysqlcheck.*: Got/mysqlcheck: Got/ /\([0-9]*\)/(errno)/
|
--replace_regex /.*mysqlcheck.*: Got/mysqlcheck: Got/ /\([0-9]*\)/(errno)/
|
||||||
--error 1
|
--error 1
|
||||||
--exec $MYSQL_UPGRADE --skip-verbose --force --host=not_existing_host 2>&1
|
--exec $MYSQL_UPGRADE --force --host=not_existing_host 2>&1
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #28401 mysql_upgrade Failed with STRICT_ALL_TABLES, ANSI_QUOTES and NO_ZERO_DATE
|
# Bug #28401 mysql_upgrade Failed with STRICT_ALL_TABLES, ANSI_QUOTES and NO_ZERO_DATE
|
||||||
@ -88,7 +88,7 @@ DROP USER mysqltest1@'%';
|
|||||||
|
|
||||||
# Test by setting sql_mode before running mysql_upgrade
|
# Test by setting sql_mode before running mysql_upgrade
|
||||||
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
|
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
|
||||||
--exec $MYSQL_UPGRADE --skip-verbose --force 2>&1
|
--exec $MYSQL_UPGRADE --force 2>&1
|
||||||
eval set GLOBAL sql_mode=default;
|
eval set GLOBAL sql_mode=default;
|
||||||
|
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ CREATE PROCEDURE testproc() BEGIN END;
|
|||||||
UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
|
UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
|
||||||
UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc';
|
UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc';
|
||||||
UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
|
UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
|
||||||
--exec $MYSQL_UPGRADE --skip-verbose --force 2> $MYSQLTEST_VARDIR/tmp/41569.txt
|
--exec $MYSQL_UPGRADE --force 2> $MYSQLTEST_VARDIR/tmp/41569.txt
|
||||||
CALL testproc();
|
CALL testproc();
|
||||||
DROP PROCEDURE testproc;
|
DROP PROCEDURE testproc;
|
||||||
--cat_file $MYSQLTEST_VARDIR/tmp/41569.txt
|
--cat_file $MYSQLTEST_VARDIR/tmp/41569.txt
|
||||||
@ -119,7 +119,7 @@ DROP PROCEDURE testproc;
|
|||||||
GRANT USAGE ON *.* TO 'user3'@'%';
|
GRANT USAGE ON *.* TO 'user3'@'%';
|
||||||
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
|
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
|
||||||
--echo Run mysql_upgrade with all privileges on a user
|
--echo Run mysql_upgrade with all privileges on a user
|
||||||
--exec $MYSQL_UPGRADE --skip-verbose --force 2>&1
|
--exec $MYSQL_UPGRADE --force 2>&1
|
||||||
SHOW GRANTS FOR 'user3'@'%';
|
SHOW GRANTS FOR 'user3'@'%';
|
||||||
|
|
||||||
DROP USER 'user3'@'%';
|
DROP USER 'user3'@'%';
|
||||||
|
@ -169,5 +169,16 @@ USE `#mysql50#.`;
|
|||||||
--error ER_WRONG_DB_NAME
|
--error ER_WRONG_DB_NAME
|
||||||
USE `#mysql50#../blablabla`;
|
USE `#mysql50#../blablabla`;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Test of Bug #56441: mysql_upgrade 5.0->5.1 fails for tables with long names
|
||||||
|
#
|
||||||
|
copy_file $MYSQL_TEST_DIR/std_data/long_table_name.MYI $MYSQLD_DATADIR/test/ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com.MYI;
|
||||||
|
copy_file $MYSQL_TEST_DIR/std_data/long_table_name.MYD $MYSQLD_DATADIR/test/ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com.MYD;
|
||||||
|
copy_file $MYSQL_TEST_DIR/std_data/long_table_name.frm $MYSQLD_DATADIR/test/ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com.frm;
|
||||||
|
show full tables;
|
||||||
|
rename table `#mysql50#ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com` to `ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com`;
|
||||||
|
show full tables;
|
||||||
|
drop table `ltoriaeinnovacionendesarrolloempres?9120761097220077376?cio_com`;
|
||||||
|
|
||||||
--echo # End of 5.1 tests
|
--echo # End of 5.1 tests
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@ regoff_t startoff = 0;
|
|||||||
regoff_t endoff = 0;
|
regoff_t endoff = 0;
|
||||||
|
|
||||||
|
|
||||||
extern int split();
|
extern int split(char *string, char **fields, int nfields, const char *sep);
|
||||||
extern void regprint();
|
extern void regprint(my_regex_t *r, FILE *d);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
- main - do the simple case, hand off to regress() for regression
|
- main - do the simple case, hand off to regress() for regression
|
||||||
|
@ -996,7 +996,7 @@ static bool print_admin_msg(THD* thd, const char* msg_type,
|
|||||||
Protocol *protocol= thd->protocol;
|
Protocol *protocol= thd->protocol;
|
||||||
uint length, msg_length;
|
uint length, msg_length;
|
||||||
char msgbuf[HA_MAX_MSG_BUF];
|
char msgbuf[HA_MAX_MSG_BUF];
|
||||||
char name[NAME_LEN*2+2];
|
char name[SAFE_NAME_LEN*2+2];
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
msg_length= my_vsnprintf(msgbuf, sizeof(msgbuf), fmt, args);
|
msg_length= my_vsnprintf(msgbuf, sizeof(msgbuf), fmt, args);
|
||||||
|
@ -3728,7 +3728,7 @@ static Item** find_field_in_group_list(Item *find_item, ORDER *group_list)
|
|||||||
int found_match_degree= 0;
|
int found_match_degree= 0;
|
||||||
Item_ident *cur_field;
|
Item_ident *cur_field;
|
||||||
int cur_match_degree= 0;
|
int cur_match_degree= 0;
|
||||||
char name_buff[NAME_LEN+1];
|
char name_buff[SAFE_NAME_LEN+1];
|
||||||
|
|
||||||
if (find_item->type() == Item::FIELD_ITEM ||
|
if (find_item->type() == Item::FIELD_ITEM ||
|
||||||
find_item->type() == Item::REF_ITEM)
|
find_item->type() == Item::REF_ITEM)
|
||||||
|
@ -3064,10 +3064,10 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
|
|||||||
object being copied.
|
object being copied.
|
||||||
*/
|
*/
|
||||||
ORDER *tmp;
|
ORDER *tmp;
|
||||||
if (!(order= (ORDER **) thd->alloc(sizeof(ORDER *) * arg_count_order +
|
if (!(tmp= (ORDER *) thd->alloc(sizeof(ORDER *) * arg_count_order +
|
||||||
sizeof(ORDER) * arg_count_order)))
|
sizeof(ORDER) * arg_count_order)))
|
||||||
return;
|
return;
|
||||||
tmp= (ORDER *)(order + arg_count_order);
|
order= (ORDER **)(tmp + arg_count_order);
|
||||||
for (uint i= 0; i < arg_count_order; i++, tmp++)
|
for (uint i= 0; i < arg_count_order; i++, tmp++)
|
||||||
{
|
{
|
||||||
memcpy(tmp, item->order[i], sizeof(ORDER));
|
memcpy(tmp, item->order[i], sizeof(ORDER));
|
||||||
@ -3076,7 +3076,6 @@ Item_func_group_concat::Item_func_group_concat(THD *thd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Item_func_group_concat::cleanup()
|
void Item_func_group_concat::cleanup()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Item_func_group_concat::cleanup");
|
DBUG_ENTER("Item_func_group_concat::cleanup");
|
||||||
|
@ -6234,7 +6234,7 @@ void Create_file_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info
|
|||||||
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
|
#if defined(HAVE_REPLICATION) && !defined(MYSQL_CLIENT)
|
||||||
void Create_file_log_event::pack_info(Protocol *protocol)
|
void Create_file_log_event::pack_info(Protocol *protocol)
|
||||||
{
|
{
|
||||||
char buf[NAME_LEN*2 + 30 + 21*2], *pos;
|
char buf[SAFE_NAME_LEN*2 + 30 + 21*2], *pos;
|
||||||
pos= strmov(buf, "db=");
|
pos= strmov(buf, "db=");
|
||||||
memcpy(pos, db, db_len);
|
memcpy(pos, db, db_len);
|
||||||
pos= strmov(pos + db_len, ";table=");
|
pos= strmov(pos + db_len, ";table=");
|
||||||
|
@ -2288,6 +2288,7 @@ const char *get_canonical_filename(handler *file, const char *path,
|
|||||||
|
|
||||||
#define MYSQL50_TABLE_NAME_PREFIX "#mysql50#"
|
#define MYSQL50_TABLE_NAME_PREFIX "#mysql50#"
|
||||||
#define MYSQL50_TABLE_NAME_PREFIX_LENGTH 9
|
#define MYSQL50_TABLE_NAME_PREFIX_LENGTH 9
|
||||||
|
#define SAFE_NAME_LEN (NAME_LEN + MYSQL50_TABLE_NAME_PREFIX_LENGTH)
|
||||||
|
|
||||||
uint build_table_shadow_filename(char *buff, size_t bufflen,
|
uint build_table_shadow_filename(char *buff, size_t bufflen,
|
||||||
ALTER_PARTITION_PARAM_TYPE *lpt);
|
ALTER_PARTITION_PARAM_TYPE *lpt);
|
||||||
|
@ -5966,6 +5966,7 @@ enum options_mysqld
|
|||||||
#if defined(ENABLED_DEBUG_SYNC)
|
#if defined(ENABLED_DEBUG_SYNC)
|
||||||
OPT_DEBUG_SYNC_TIMEOUT,
|
OPT_DEBUG_SYNC_TIMEOUT,
|
||||||
#endif /* defined(ENABLED_DEBUG_SYNC) */
|
#endif /* defined(ENABLED_DEBUG_SYNC) */
|
||||||
|
OPT_DEPRECATED_OPTION,
|
||||||
OPT_SLAVE_EXEC_MODE,
|
OPT_SLAVE_EXEC_MODE,
|
||||||
OPT_DEADLOCK_SEARCH_DEPTH_SHORT,
|
OPT_DEADLOCK_SEARCH_DEPTH_SHORT,
|
||||||
OPT_DEADLOCK_SEARCH_DEPTH_LONG,
|
OPT_DEADLOCK_SEARCH_DEPTH_LONG,
|
||||||
@ -6743,6 +6744,9 @@ thread is in the relay logs.",
|
|||||||
"Show user and password in SHOW SLAVE HOSTS on this master.",
|
"Show user and password in SHOW SLAVE HOSTS on this master.",
|
||||||
&opt_show_slave_auth_info, &opt_show_slave_auth_info, 0,
|
&opt_show_slave_auth_info, &opt_show_slave_auth_info, 0,
|
||||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"skip-bdb", OPT_DEPRECATED_OPTION,
|
||||||
|
"Deprecated option; Exist only for compatiblity with old my.cnf files",
|
||||||
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#ifndef DISABLE_GRANT_OPTIONS
|
#ifndef DISABLE_GRANT_OPTIONS
|
||||||
{"skip-grant-tables", OPT_SKIP_GRANT,
|
{"skip-grant-tables", OPT_SKIP_GRANT,
|
||||||
"Start without grant tables. This gives all users FULL ACCESS to all tables.",
|
"Start without grant tables. This gives all users FULL ACCESS to all tables.",
|
||||||
@ -8415,6 +8419,10 @@ mysqld_get_one_option(int optid,
|
|||||||
case '0':
|
case '0':
|
||||||
WARN_DEPRECATED(NULL, VER_CELOSIA, "--log-long-format", "--log-short-format");
|
WARN_DEPRECATED(NULL, VER_CELOSIA, "--log-long-format", "--log-short-format");
|
||||||
break;
|
break;
|
||||||
|
case OPT_DEPRECATED_OPTION:
|
||||||
|
sql_print_warning("'%s' is deprecated and exists only for compatiblity with old my.cnf files; Please remove this option from all your my.cnf files!",
|
||||||
|
opt->name);
|
||||||
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
global_system_variables.sql_mode= fix_sql_mode(MODE_ANSI);
|
global_system_variables.sql_mode= fix_sql_mode(MODE_ANSI);
|
||||||
global_system_variables.tx_isolation= ISO_SERIALIZABLE;
|
global_system_variables.tx_isolation= ISO_SERIALIZABLE;
|
||||||
@ -8778,8 +8786,7 @@ mysqld_get_one_option(int optid,
|
|||||||
if (!slave_warning_issued) //only show the warning once
|
if (!slave_warning_issued) //only show the warning once
|
||||||
{
|
{
|
||||||
slave_warning_issued = true;
|
slave_warning_issued = true;
|
||||||
WARN_DEPRECATED(NULL, "6.0", "for replication startup options",
|
WARN_DEPRECATED(NULL, "6.0", opt->name, "'CHANGE MASTER'");
|
||||||
"'CHANGE MASTER'");
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OPT_CONSOLE:
|
case OPT_CONSOLE:
|
||||||
|
@ -91,7 +91,7 @@ Rpl_filter::tables_ok(const char* db, TABLE_LIST* tables)
|
|||||||
|
|
||||||
for (; tables; tables= tables->next_global)
|
for (; tables; tables= tables->next_global)
|
||||||
{
|
{
|
||||||
char hash_key[2*NAME_LEN+2];
|
char hash_key[SAFE_NAME_LEN*2+2];
|
||||||
char *end;
|
char *end;
|
||||||
uint len;
|
uint len;
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ Rpl_filter::db_ok_with_wild_table(const char *db)
|
|||||||
{
|
{
|
||||||
DBUG_ENTER("Rpl_filter::db_ok_with_wild_table");
|
DBUG_ENTER("Rpl_filter::db_ok_with_wild_table");
|
||||||
|
|
||||||
char hash_key[NAME_LEN+2];
|
char hash_key[SAFE_NAME_LEN+2];
|
||||||
char *end;
|
char *end;
|
||||||
int len;
|
int len;
|
||||||
end= strmov(hash_key, db);
|
end= strmov(hash_key, db);
|
||||||
|
@ -717,7 +717,7 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
|
|||||||
{
|
{
|
||||||
LEX *old_lex= thd->lex, newlex;
|
LEX *old_lex= thd->lex, newlex;
|
||||||
String defstr;
|
String defstr;
|
||||||
char saved_cur_db_name_buf[NAME_LEN+1];
|
char saved_cur_db_name_buf[SAFE_NAME_LEN+1];
|
||||||
LEX_STRING saved_cur_db_name=
|
LEX_STRING saved_cur_db_name=
|
||||||
{ saved_cur_db_name_buf, sizeof(saved_cur_db_name_buf) };
|
{ saved_cur_db_name_buf, sizeof(saved_cur_db_name_buf) };
|
||||||
bool cur_db_changed;
|
bool cur_db_changed;
|
||||||
@ -1928,7 +1928,7 @@ sp_cache_routines_and_add_tables_aux(THD *thd, LEX *lex,
|
|||||||
Hence, the overrun happens only if the name is in length > 32 and
|
Hence, the overrun happens only if the name is in length > 32 and
|
||||||
uses multibyte (cyrillic, greek, etc.)
|
uses multibyte (cyrillic, greek, etc.)
|
||||||
*/
|
*/
|
||||||
char n[NAME_LEN*2+2];
|
char n[SAFE_NAME_LEN*2+2];
|
||||||
|
|
||||||
/* m_qname.str is not always \0 terminated */
|
/* m_qname.str is not always \0 terminated */
|
||||||
memcpy(n, name.m_qname.str, name.m_qname.length);
|
memcpy(n, name.m_qname.str, name.m_qname.length);
|
||||||
|
@ -1085,7 +1085,7 @@ bool
|
|||||||
sp_head::execute(THD *thd)
|
sp_head::execute(THD *thd)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("sp_head::execute");
|
DBUG_ENTER("sp_head::execute");
|
||||||
char saved_cur_db_name_buf[NAME_LEN+1];
|
char saved_cur_db_name_buf[SAFE_NAME_LEN+1];
|
||||||
LEX_STRING saved_cur_db_name=
|
LEX_STRING saved_cur_db_name=
|
||||||
{ saved_cur_db_name_buf, sizeof(saved_cur_db_name_buf) };
|
{ saved_cur_db_name_buf, sizeof(saved_cur_db_name_buf) };
|
||||||
bool cur_db_changed= FALSE;
|
bool cur_db_changed= FALSE;
|
||||||
@ -3851,7 +3851,7 @@ sp_head::merge_table_list(THD *thd, TABLE_LIST *table, LEX *lex_for_tmp_check)
|
|||||||
for (; table ; table= table->next_global)
|
for (; table ; table= table->next_global)
|
||||||
if (!table->derived && !table->schema_table)
|
if (!table->derived && !table->schema_table)
|
||||||
{
|
{
|
||||||
char tname[(NAME_LEN + 1) * 3]; // db\0table\0alias\0
|
char tname[(SAFE_NAME_LEN + 1) * 3]; // db\0table\0alias\0
|
||||||
uint tlen, alen;
|
uint tlen, alen;
|
||||||
|
|
||||||
tlen= table->db_length;
|
tlen= table->db_length;
|
||||||
|
@ -313,7 +313,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
|
|||||||
READ_RECORD read_record_info;
|
READ_RECORD read_record_info;
|
||||||
my_bool return_val= TRUE;
|
my_bool return_val= TRUE;
|
||||||
bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
|
bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
|
||||||
char tmp_name[NAME_LEN+1];
|
char tmp_name[SAFE_NAME_LEN+1];
|
||||||
int password_length;
|
int password_length;
|
||||||
ulong old_sql_mode= thd->variables.sql_mode;
|
ulong old_sql_mode= thd->variables.sql_mode;
|
||||||
DBUG_ENTER("acl_load");
|
DBUG_ENTER("acl_load");
|
||||||
@ -2453,7 +2453,7 @@ static GRANT_NAME *name_hash_search(HASH *name_hash,
|
|||||||
const char *user, const char *tname,
|
const char *user, const char *tname,
|
||||||
bool exact, bool name_tolower)
|
bool exact, bool name_tolower)
|
||||||
{
|
{
|
||||||
char helping [NAME_LEN*2+USERNAME_LENGTH+3], *name_ptr;
|
char helping [SAFE_NAME_LEN*2+USERNAME_LENGTH+3], *name_ptr;
|
||||||
uint len;
|
uint len;
|
||||||
GRANT_NAME *grant_name,*found=0;
|
GRANT_NAME *grant_name,*found=0;
|
||||||
HASH_SEARCH_STATE state;
|
HASH_SEARCH_STATE state;
|
||||||
@ -3431,7 +3431,7 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
|
|||||||
{
|
{
|
||||||
List_iterator <LEX_USER> str_list (list);
|
List_iterator <LEX_USER> str_list (list);
|
||||||
LEX_USER *Str, *tmp_Str;
|
LEX_USER *Str, *tmp_Str;
|
||||||
char tmp_db[NAME_LEN+1];
|
char tmp_db[SAFE_NAME_LEN+1];
|
||||||
bool create_new_users=0;
|
bool create_new_users=0;
|
||||||
TABLE_LIST tables[2];
|
TABLE_LIST tables[2];
|
||||||
bool save_binlog_row_based;
|
bool save_binlog_row_based;
|
||||||
@ -4316,7 +4316,7 @@ static bool check_grant_db_routine(THD *thd, const char *db, HASH *hash)
|
|||||||
bool check_grant_db(THD *thd,const char *db)
|
bool check_grant_db(THD *thd,const char *db)
|
||||||
{
|
{
|
||||||
Security_context *sctx= thd->security_ctx;
|
Security_context *sctx= thd->security_ctx;
|
||||||
char helping [NAME_LEN+USERNAME_LENGTH+2];
|
char helping [SAFE_NAME_LEN + USERNAME_LENGTH+2];
|
||||||
uint len;
|
uint len;
|
||||||
bool error= TRUE;
|
bool error= TRUE;
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ void release_table_share(TABLE_SHARE *share, enum release_type type)
|
|||||||
|
|
||||||
TABLE_SHARE *get_cached_table_share(const char *db, const char *table_name)
|
TABLE_SHARE *get_cached_table_share(const char *db, const char *table_name)
|
||||||
{
|
{
|
||||||
char key[NAME_LEN*2+2];
|
char key[SAFE_NAME_LEN*2+2];
|
||||||
TABLE_LIST table_list;
|
TABLE_LIST table_list;
|
||||||
uint key_length;
|
uint key_length;
|
||||||
safe_mutex_assert_owner(&LOCK_open);
|
safe_mutex_assert_owner(&LOCK_open);
|
||||||
@ -6311,7 +6311,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
|
|||||||
const char *table_name= item->table_name;
|
const char *table_name= item->table_name;
|
||||||
const char *name= item->field_name;
|
const char *name= item->field_name;
|
||||||
uint length=(uint) strlen(name);
|
uint length=(uint) strlen(name);
|
||||||
char name_buff[NAME_LEN+1];
|
char name_buff[SAFE_NAME_LEN+1];
|
||||||
TABLE_LIST *cur_table= first_table;
|
TABLE_LIST *cur_table= first_table;
|
||||||
TABLE_LIST *actual_table;
|
TABLE_LIST *actual_table;
|
||||||
bool allow_rowid;
|
bool allow_rowid;
|
||||||
@ -6468,7 +6468,7 @@ find_field_in_tables(THD *thd, Item_ident *item,
|
|||||||
(report_error == REPORT_ALL_ERRORS ||
|
(report_error == REPORT_ALL_ERRORS ||
|
||||||
report_error == REPORT_EXCEPT_NON_UNIQUE))
|
report_error == REPORT_EXCEPT_NON_UNIQUE))
|
||||||
{
|
{
|
||||||
char buff[NAME_LEN*2 + 2];
|
char buff[SAFE_NAME_LEN*2 + 2];
|
||||||
if (db && db[0])
|
if (db && db[0])
|
||||||
{
|
{
|
||||||
strxnmov(buff,sizeof(buff)-1,db,".",table_name,NullS);
|
strxnmov(buff,sizeof(buff)-1,db,".",table_name,NullS);
|
||||||
@ -7854,7 +7854,7 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
|
|||||||
{
|
{
|
||||||
Field_iterator_table_ref field_iterator;
|
Field_iterator_table_ref field_iterator;
|
||||||
bool found;
|
bool found;
|
||||||
char name_buff[NAME_LEN+1];
|
char name_buff[SAFE_NAME_LEN+1];
|
||||||
DBUG_ENTER("insert_fields");
|
DBUG_ENTER("insert_fields");
|
||||||
DBUG_PRINT("arena", ("stmt arena: 0x%lx", (ulong)thd->stmt_arena));
|
DBUG_PRINT("arena", ("stmt arena: 0x%lx", (ulong)thd->stmt_arena));
|
||||||
|
|
||||||
|
@ -851,8 +851,8 @@ static int check_connection(THD *thd)
|
|||||||
char *passwd= strend(user)+1;
|
char *passwd= strend(user)+1;
|
||||||
uint user_len= passwd - user - 1;
|
uint user_len= passwd - user - 1;
|
||||||
char *db= passwd;
|
char *db= passwd;
|
||||||
char db_buff[NAME_LEN + 1]; // buffer to store db in utf8
|
char db_buff[SAFE_NAME_LEN*2 + 1]; // buffer to store db in utf8
|
||||||
char user_buff[USERNAME_LENGTH + 1]; // buffer to store user in utf8
|
char user_buff[USERNAME_LENGTH*2 + 1]; // buffer to store user in utf8
|
||||||
uint dummy_errors;
|
uint dummy_errors;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1125,7 +1125,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
Cast *passwd to an unsigned char, so that it doesn't extend the sign
|
Cast *passwd to an unsigned char, so that it doesn't extend the sign
|
||||||
for *passwd > 127 and become 2**32-127 after casting to uint.
|
for *passwd > 127 and become 2**32-127 after casting to uint.
|
||||||
*/
|
*/
|
||||||
char db_buff[NAME_LEN+1]; // buffer to store db in utf8
|
char db_buff[SAFE_NAME_LEN*2+1]; // buffer to store db in utf8
|
||||||
char *db= passwd;
|
char *db= passwd;
|
||||||
char *save_db;
|
char *save_db;
|
||||||
/*
|
/*
|
||||||
@ -1329,7 +1329,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
char *fields, *packet_end= packet + packet_length, *wildcard;
|
char *fields, *packet_end= packet + packet_length, *wildcard;
|
||||||
/* Locked closure of all tables */
|
/* Locked closure of all tables */
|
||||||
TABLE_LIST table_list;
|
TABLE_LIST table_list;
|
||||||
char db_buff[NAME_LEN+1];
|
char db_buff[SAFE_NAME_LEN+1];
|
||||||
uint32 db_length;
|
uint32 db_length;
|
||||||
uint dummy_errors, query_length;
|
uint dummy_errors, query_length;
|
||||||
|
|
||||||
@ -1348,7 +1348,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
|||||||
db_length= wildcard - packet;
|
db_length= wildcard - packet;
|
||||||
wildcard++;
|
wildcard++;
|
||||||
query_length= (uint) (packet_end - wildcard); // Don't count end \0
|
query_length= (uint) (packet_end - wildcard); // Don't count end \0
|
||||||
if (db_length > NAME_LEN || query_length > NAME_LEN)
|
if (db_length > SAFE_NAME_LEN || query_length > NAME_LEN)
|
||||||
{
|
{
|
||||||
my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
|
my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
|
||||||
break;
|
break;
|
||||||
|
@ -3338,7 +3338,7 @@ reexecute:
|
|||||||
bool
|
bool
|
||||||
Prepared_statement::reprepare()
|
Prepared_statement::reprepare()
|
||||||
{
|
{
|
||||||
char saved_cur_db_name_buf[NAME_LEN+1];
|
char saved_cur_db_name_buf[SAFE_NAME_LEN+1];
|
||||||
LEX_STRING saved_cur_db_name=
|
LEX_STRING saved_cur_db_name=
|
||||||
{ saved_cur_db_name_buf, sizeof(saved_cur_db_name_buf) };
|
{ saved_cur_db_name_buf, sizeof(saved_cur_db_name_buf) };
|
||||||
LEX_STRING stmt_db_name= { db, db_length };
|
LEX_STRING stmt_db_name= { db, db_length };
|
||||||
@ -3499,7 +3499,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
|
|||||||
Query_arena *old_stmt_arena;
|
Query_arena *old_stmt_arena;
|
||||||
bool error= TRUE;
|
bool error= TRUE;
|
||||||
|
|
||||||
char saved_cur_db_name_buf[NAME_LEN+1];
|
char saved_cur_db_name_buf[SAFE_NAME_LEN+1];
|
||||||
LEX_STRING saved_cur_db_name=
|
LEX_STRING saved_cur_db_name=
|
||||||
{ saved_cur_db_name_buf, sizeof(saved_cur_db_name_buf) };
|
{ saved_cur_db_name_buf, sizeof(saved_cur_db_name_buf) };
|
||||||
bool cur_db_changed;
|
bool cur_db_changed;
|
||||||
|
@ -16707,7 +16707,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
|
|||||||
the UNION to provide precise EXPLAIN information will hardly be
|
the UNION to provide precise EXPLAIN information will hardly be
|
||||||
appreciated :)
|
appreciated :)
|
||||||
*/
|
*/
|
||||||
char table_name_buffer[NAME_LEN];
|
char table_name_buffer[SAFE_NAME_LEN];
|
||||||
item_list.empty();
|
item_list.empty();
|
||||||
/* id */
|
/* id */
|
||||||
item_list.push_back(new Item_null);
|
item_list.push_back(new Item_null);
|
||||||
@ -16780,7 +16780,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
|
|||||||
char buff1[512], buff2[512], buff3[512];
|
char buff1[512], buff2[512], buff3[512];
|
||||||
char keylen_str_buf[64];
|
char keylen_str_buf[64];
|
||||||
String extra(buff, sizeof(buff),cs);
|
String extra(buff, sizeof(buff),cs);
|
||||||
char table_name_buffer[NAME_LEN];
|
char table_name_buffer[SAFE_NAME_LEN];
|
||||||
String tmp1(buff1,sizeof(buff1),cs);
|
String tmp1(buff1,sizeof(buff1),cs);
|
||||||
String tmp2(buff2,sizeof(buff2),cs);
|
String tmp2(buff2,sizeof(buff2),cs);
|
||||||
String tmp3(buff3,sizeof(buff3),cs);
|
String tmp3(buff3,sizeof(buff3),cs);
|
||||||
|
@ -493,7 +493,7 @@ find_files(THD *thd, List<LEX_STRING> *files, const char *db,
|
|||||||
|
|
||||||
for (i=0 ; i < (uint) dirp->number_off_files ; i++)
|
for (i=0 ; i < (uint) dirp->number_off_files ; i++)
|
||||||
{
|
{
|
||||||
char uname[NAME_LEN + 1]; /* Unencoded name */
|
char uname[SAFE_NAME_LEN + 1]; /* Unencoded name */
|
||||||
file=dirp->dir_entry+i;
|
file=dirp->dir_entry+i;
|
||||||
if (dir)
|
if (dir)
|
||||||
{ /* Return databases */
|
{ /* Return databases */
|
||||||
@ -4254,7 +4254,7 @@ bool store_schema_proc(THD *thd, TABLE *table, TABLE *proc_table,
|
|||||||
MYSQL_TIME time;
|
MYSQL_TIME time;
|
||||||
LEX *lex= thd->lex;
|
LEX *lex= thd->lex;
|
||||||
CHARSET_INFO *cs= system_charset_info;
|
CHARSET_INFO *cs= system_charset_info;
|
||||||
char sp_db_buff[NAME_LEN + 1], sp_name_buff[NAME_LEN + 1],
|
char sp_db_buff[SAFE_NAME_LEN + 1], sp_name_buff[SAFE_NAME_LEN + 1],
|
||||||
definer_buff[USERNAME_LENGTH + HOSTNAME_LENGTH + 2];
|
definer_buff[USERNAME_LENGTH + HOSTNAME_LENGTH + 2];
|
||||||
String sp_db(sp_db_buff, sizeof(sp_db_buff), cs);
|
String sp_db(sp_db_buff, sizeof(sp_db_buff), cs);
|
||||||
String sp_name(sp_name_buff, sizeof(sp_name_buff), cs);
|
String sp_name(sp_name_buff, sizeof(sp_name_buff), cs);
|
||||||
@ -6589,8 +6589,8 @@ ST_FIELD_INFO table_names_fields_info[]=
|
|||||||
{
|
{
|
||||||
{"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
|
{"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
|
||||||
{"TABLE_SCHEMA",NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
|
{"TABLE_SCHEMA",NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
|
||||||
{"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Tables_in_",
|
{"TABLE_NAME", NAME_CHAR_LEN + MYSQL50_TABLE_NAME_PREFIX_LENGTH,
|
||||||
SKIP_OPEN_TABLE},
|
MYSQL_TYPE_STRING, 0, 0, "Tables_in_", SKIP_OPEN_TABLE},
|
||||||
{"TABLE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Table_type",
|
{"TABLE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Table_type",
|
||||||
OPEN_FRM_ONLY},
|
OPEN_FRM_ONLY},
|
||||||
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
|
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
|
||||||
|
@ -54,6 +54,7 @@ static bool
|
|||||||
mysql_prepare_alter_table(THD *thd, TABLE *table,
|
mysql_prepare_alter_table(THD *thd, TABLE *table,
|
||||||
HA_CREATE_INFO *create_info,
|
HA_CREATE_INFO *create_info,
|
||||||
Alter_info *alter_info);
|
Alter_info *alter_info);
|
||||||
|
static bool admin_recreate_table(THD *thd, TABLE_LIST *table_list);
|
||||||
|
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
|
|
||||||
@ -4172,7 +4173,7 @@ mysql_rename_table(handlerton *base, const char *old_db,
|
|||||||
char from[FN_REFLEN + 1], to[FN_REFLEN + 1],
|
char from[FN_REFLEN + 1], to[FN_REFLEN + 1],
|
||||||
lc_from[FN_REFLEN + 1], lc_to[FN_REFLEN + 1];
|
lc_from[FN_REFLEN + 1], lc_to[FN_REFLEN + 1];
|
||||||
char *from_base= from, *to_base= to;
|
char *from_base= from, *to_base= to;
|
||||||
char tmp_name[NAME_LEN+1];
|
char tmp_name[SAFE_NAME_LEN+1];
|
||||||
handler *file;
|
handler *file;
|
||||||
int error=0;
|
int error=0;
|
||||||
DBUG_ENTER("mysql_rename_table");
|
DBUG_ENTER("mysql_rename_table");
|
||||||
@ -4567,6 +4568,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
|
|||||||
Protocol *protocol= thd->protocol;
|
Protocol *protocol= thd->protocol;
|
||||||
LEX *lex= thd->lex;
|
LEX *lex= thd->lex;
|
||||||
int result_code;
|
int result_code;
|
||||||
|
bool need_repair_or_alter= 0;
|
||||||
DBUG_ENTER("mysql_admin_table");
|
DBUG_ENTER("mysql_admin_table");
|
||||||
|
|
||||||
if (end_active_trans(thd))
|
if (end_active_trans(thd))
|
||||||
@ -4587,7 +4589,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
|
|||||||
|
|
||||||
for (table= tables; table; table= table->next_local)
|
for (table= tables; table; table= table->next_local)
|
||||||
{
|
{
|
||||||
char table_name[NAME_LEN*2+2];
|
char table_name[SAFE_NAME_LEN*2+2];
|
||||||
char* db = table->db;
|
char* db = table->db;
|
||||||
bool fatal_error=0;
|
bool fatal_error=0;
|
||||||
|
|
||||||
@ -4795,32 +4797,38 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
|
|||||||
if (operator_func == &handler::ha_repair &&
|
if (operator_func == &handler::ha_repair &&
|
||||||
!(check_opt->sql_flags & TT_USEFRM))
|
!(check_opt->sql_flags & TT_USEFRM))
|
||||||
{
|
{
|
||||||
if ((table->table->file->check_old_types() == HA_ADMIN_NEEDS_ALTER) ||
|
handler *file= table->table->file;
|
||||||
(table->table->file->ha_check_for_upgrade(check_opt) ==
|
int check_old_types= file->check_old_types();
|
||||||
HA_ADMIN_NEEDS_ALTER))
|
int check_for_upgrade= file->ha_check_for_upgrade(check_opt);
|
||||||
|
|
||||||
|
if (check_old_types == HA_ADMIN_NEEDS_ALTER ||
|
||||||
|
check_for_upgrade == HA_ADMIN_NEEDS_ALTER)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("admin", ("recreating table"));
|
/* We use extra_open_options to be able to open crashed tables */
|
||||||
ha_autocommit_or_rollback(thd, 1);
|
thd->open_options|= extra_open_options;
|
||||||
close_thread_tables(thd);
|
result_code= admin_recreate_table(thd, table);
|
||||||
tmp_disable_binlog(thd); // binlogging is done by caller if wanted
|
thd->open_options= ~extra_open_options;
|
||||||
result_code= mysql_recreate_table(thd, table);
|
|
||||||
reenable_binlog(thd);
|
|
||||||
/*
|
|
||||||
mysql_recreate_table() can push OK or ERROR.
|
|
||||||
Clear 'OK' status. If there is an error, keep it:
|
|
||||||
we will store the error message in a result set row
|
|
||||||
and then clear.
|
|
||||||
*/
|
|
||||||
if (thd->main_da.is_ok())
|
|
||||||
thd->main_da.reset_diagnostics_area();
|
|
||||||
goto send_result;
|
goto send_result;
|
||||||
}
|
}
|
||||||
|
if (check_old_types || check_for_upgrade)
|
||||||
|
{
|
||||||
|
/* If repair is not implemented for the engine, run ALTER TABLE */
|
||||||
|
need_repair_or_alter= 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DBUG_PRINT("admin", ("calling operator_func '%s'", operator_name));
|
DBUG_PRINT("admin", ("calling operator_func '%s'", operator_name));
|
||||||
result_code = (table->table->file->*operator_func)(thd, check_opt);
|
result_code = (table->table->file->*operator_func)(thd, check_opt);
|
||||||
DBUG_PRINT("admin", ("operator_func returned: %d", result_code));
|
DBUG_PRINT("admin", ("operator_func returned: %d", result_code));
|
||||||
|
|
||||||
|
if (result_code == HA_ADMIN_NOT_IMPLEMENTED && need_repair_or_alter)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
repair was not implemented and we need to upgrade the table
|
||||||
|
to a new version so we recreate the table with ALTER TABLE
|
||||||
|
*/
|
||||||
|
result_code= admin_recreate_table(thd, table);
|
||||||
|
}
|
||||||
send_result:
|
send_result:
|
||||||
|
|
||||||
lex->cleanup_after_one_table_open();
|
lex->cleanup_after_one_table_open();
|
||||||
@ -4920,23 +4928,13 @@ send_result_message:
|
|||||||
system_charset_info);
|
system_charset_info);
|
||||||
if (protocol->write())
|
if (protocol->write())
|
||||||
goto err;
|
goto err;
|
||||||
ha_autocommit_or_rollback(thd, 0);
|
|
||||||
close_thread_tables(thd);
|
|
||||||
DBUG_PRINT("info", ("HA_ADMIN_TRY_ALTER, trying analyze..."));
|
DBUG_PRINT("info", ("HA_ADMIN_TRY_ALTER, trying analyze..."));
|
||||||
TABLE_LIST *save_next_local= table->next_local,
|
TABLE_LIST *save_next_local= table->next_local,
|
||||||
*save_next_global= table->next_global;
|
*save_next_global= table->next_global;
|
||||||
table->next_local= table->next_global= 0;
|
table->next_local= table->next_global= 0;
|
||||||
tmp_disable_binlog(thd); // binlogging is done by caller if wanted
|
|
||||||
result_code= mysql_recreate_table(thd, table);
|
result_code= admin_recreate_table(thd, table);
|
||||||
reenable_binlog(thd);
|
|
||||||
/*
|
|
||||||
mysql_recreate_table() can push OK or ERROR.
|
|
||||||
Clear 'OK' status. If there is an error, keep it:
|
|
||||||
we will store the error message in a result set row
|
|
||||||
and then clear.
|
|
||||||
*/
|
|
||||||
if (thd->main_da.is_ok())
|
|
||||||
thd->main_da.reset_diagnostics_area();
|
|
||||||
ha_autocommit_or_rollback(thd, 0);
|
ha_autocommit_or_rollback(thd, 0);
|
||||||
close_thread_tables(thd);
|
close_thread_tables(thd);
|
||||||
if (!result_code) // recreation went ok
|
if (!result_code) // recreation went ok
|
||||||
@ -7954,6 +7952,30 @@ err:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Prepare, run and cleanup for mysql_recreate_table() */
|
||||||
|
|
||||||
|
static bool admin_recreate_table(THD *thd, TABLE_LIST *table_list)
|
||||||
|
{
|
||||||
|
bool result_code;
|
||||||
|
DBUG_ENTER("admin_recreate_table");
|
||||||
|
|
||||||
|
ha_autocommit_or_rollback(thd, 1);
|
||||||
|
close_thread_tables(thd);
|
||||||
|
tmp_disable_binlog(thd); // binlogging is done by caller if wanted
|
||||||
|
result_code= mysql_recreate_table(thd, table_list);
|
||||||
|
reenable_binlog(thd);
|
||||||
|
/*
|
||||||
|
mysql_recreate_table() can push OK or ERROR.
|
||||||
|
Clear 'OK' status. If there is an error, keep it:
|
||||||
|
we will store the error message in a result set row
|
||||||
|
and then clear.
|
||||||
|
*/
|
||||||
|
if (thd->main_da.is_ok())
|
||||||
|
thd->main_da.reset_diagnostics_area();
|
||||||
|
DBUG_RETURN(result_code);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Recreates tables by calling mysql_alter_table().
|
Recreates tables by calling mysql_alter_table().
|
||||||
|
|
||||||
@ -8010,7 +8032,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables,
|
|||||||
/* Open one table after the other to keep lock time as short as possible. */
|
/* Open one table after the other to keep lock time as short as possible. */
|
||||||
for (table= tables; table; table= table->next_local)
|
for (table= tables; table; table= table->next_local)
|
||||||
{
|
{
|
||||||
char table_name[NAME_LEN*2+2];
|
char table_name[SAFE_NAME_LEN*2+2];
|
||||||
TABLE *t;
|
TABLE *t;
|
||||||
|
|
||||||
strxmov(table_name, table->db ,".", table->table_name, NullS);
|
strxmov(table_name, table->db ,".", table->table_name, NullS);
|
||||||
|
@ -1391,7 +1391,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
|
|||||||
To remove this prefix we use check_n_cut_mysql50_prefix().
|
To remove this prefix we use check_n_cut_mysql50_prefix().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char fname[NAME_LEN + 1];
|
char fname[SAFE_NAME_LEN + 1];
|
||||||
DBUG_ASSERT((!my_strcasecmp(table_alias_charset, lex.query_tables->db, db) ||
|
DBUG_ASSERT((!my_strcasecmp(table_alias_charset, lex.query_tables->db, db) ||
|
||||||
(check_n_cut_mysql50_prefix(db, fname, sizeof(fname)) &&
|
(check_n_cut_mysql50_prefix(db, fname, sizeof(fname)) &&
|
||||||
!my_strcasecmp(table_alias_charset, lex.query_tables->db, fname))) &&
|
!my_strcasecmp(table_alias_charset, lex.query_tables->db, fname))) &&
|
||||||
@ -1917,7 +1917,7 @@ bool Table_triggers_list::change_table_name(THD *thd, const char *db,
|
|||||||
*/
|
*/
|
||||||
if (my_strcasecmp(table_alias_charset, db, new_db))
|
if (my_strcasecmp(table_alias_charset, db, new_db))
|
||||||
{
|
{
|
||||||
char dbname[NAME_LEN + 1];
|
char dbname[SAFE_NAME_LEN + 1];
|
||||||
if (check_n_cut_mysql50_prefix(db, dbname, sizeof(dbname)) &&
|
if (check_n_cut_mysql50_prefix(db, dbname, sizeof(dbname)) &&
|
||||||
!my_strcasecmp(table_alias_charset, dbname, new_db))
|
!my_strcasecmp(table_alias_charset, dbname, new_db))
|
||||||
{
|
{
|
||||||
|
@ -209,7 +209,7 @@ void udf_init()
|
|||||||
}
|
}
|
||||||
tmp->dlhandle = dl;
|
tmp->dlhandle = dl;
|
||||||
{
|
{
|
||||||
char buf[NAME_LEN+16], *missing;
|
char buf[SAFE_NAME_LEN+16], *missing;
|
||||||
if ((missing= init_syms(tmp, buf)))
|
if ((missing= init_syms(tmp, buf)))
|
||||||
{
|
{
|
||||||
sql_print_error(ER(ER_CANT_FIND_DL_ENTRY), missing);
|
sql_print_error(ER(ER_CANT_FIND_DL_ENTRY), missing);
|
||||||
@ -463,7 +463,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
|
|||||||
}
|
}
|
||||||
udf->dlhandle=dl;
|
udf->dlhandle=dl;
|
||||||
{
|
{
|
||||||
char buf[NAME_LEN+16], *missing;
|
char buf[SAFE_NAME_LEN+16], *missing;
|
||||||
if ((missing= init_syms(udf, buf)))
|
if ((missing= init_syms(udf, buf)))
|
||||||
{
|
{
|
||||||
my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), missing);
|
my_error(ER_CANT_FIND_DL_ENTRY, MYF(0), missing);
|
||||||
|
@ -1189,7 +1189,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
|
|||||||
table->view= lex= thd->lex= (LEX*) new(thd->mem_root) st_lex_local;
|
table->view= lex= thd->lex= (LEX*) new(thd->mem_root) st_lex_local;
|
||||||
|
|
||||||
{
|
{
|
||||||
char old_db_buf[NAME_LEN+1];
|
char old_db_buf[SAFE_NAME_LEN+1];
|
||||||
LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) };
|
LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) };
|
||||||
bool dbchanged;
|
bool dbchanged;
|
||||||
Parser_state parser_state;
|
Parser_state parser_state;
|
||||||
|
18
sql/table.cc
18
sql/table.cc
@ -866,7 +866,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
|||||||
/* Read extra data segment */
|
/* Read extra data segment */
|
||||||
uchar *buff, *next_chunk, *buff_end;
|
uchar *buff, *next_chunk, *buff_end;
|
||||||
DBUG_PRINT("info", ("extra segment size is %u bytes", n_length));
|
DBUG_PRINT("info", ("extra segment size is %u bytes", n_length));
|
||||||
if (!(next_chunk= buff= (uchar*) my_malloc(n_length, MYF(MY_WME))))
|
if (!(next_chunk= buff= (uchar*) my_malloc(n_length+1, MYF(MY_WME))))
|
||||||
goto err;
|
goto err;
|
||||||
if (my_pread(file, buff, n_length, record_offset + share->reclength,
|
if (my_pread(file, buff, n_length, record_offset + share->reclength,
|
||||||
MYF(MY_NABP)))
|
MYF(MY_NABP)))
|
||||||
@ -945,6 +945,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
|||||||
{
|
{
|
||||||
/* purecov: begin inspected */
|
/* purecov: begin inspected */
|
||||||
error= 8;
|
error= 8;
|
||||||
|
name.str[name.length]= 0;
|
||||||
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), name.str);
|
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), name.str);
|
||||||
my_free(buff, MYF(0));
|
my_free(buff, MYF(0));
|
||||||
goto err;
|
goto err;
|
||||||
@ -2699,15 +2700,15 @@ bool check_db_name(LEX_STRING *org_name)
|
|||||||
uint name_length= org_name->length;
|
uint name_length= org_name->length;
|
||||||
bool check_for_path_chars;
|
bool check_for_path_chars;
|
||||||
|
|
||||||
if (!name_length || name_length > NAME_LEN)
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if ((check_for_path_chars= check_mysql50_prefix(name)))
|
if ((check_for_path_chars= check_mysql50_prefix(name)))
|
||||||
{
|
{
|
||||||
name+= MYSQL50_TABLE_NAME_PREFIX_LENGTH;
|
name+= MYSQL50_TABLE_NAME_PREFIX_LENGTH;
|
||||||
name_length-= MYSQL50_TABLE_NAME_PREFIX_LENGTH;
|
name_length-= MYSQL50_TABLE_NAME_PREFIX_LENGTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!name_length || name_length > NAME_LEN)
|
||||||
|
return 1;
|
||||||
|
|
||||||
if (lower_case_table_names && name != any_db)
|
if (lower_case_table_names && name != any_db)
|
||||||
my_casedn_str(files_charset_info, name);
|
my_casedn_str(files_charset_info, name);
|
||||||
|
|
||||||
@ -2725,6 +2726,15 @@ bool check_table_name(const char *name, uint length, bool check_for_path_chars)
|
|||||||
{
|
{
|
||||||
uint name_length= 0; // name length in symbols
|
uint name_length= 0; // name length in symbols
|
||||||
const char *end= name+length;
|
const char *end= name+length;
|
||||||
|
|
||||||
|
|
||||||
|
if (!check_for_path_chars &&
|
||||||
|
(check_for_path_chars= check_mysql50_prefix(name)))
|
||||||
|
{
|
||||||
|
name+= MYSQL50_TABLE_NAME_PREFIX_LENGTH;
|
||||||
|
length-= MYSQL50_TABLE_NAME_PREFIX_LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
if (!length || length > NAME_LEN)
|
if (!length || length > NAME_LEN)
|
||||||
return 1;
|
return 1;
|
||||||
#if defined(USE_MB) && defined(USE_MB_IDENT)
|
#if defined(USE_MB) && defined(USE_MB_IDENT)
|
||||||
|
@ -150,6 +150,17 @@ int az_open (azio_stream *s, const char *path, int Flags, File fd)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* Reset values in case of old version of archive file */
|
||||||
|
s->rows= 0;
|
||||||
|
s->forced_flushes= 0;
|
||||||
|
s->shortest_row= 0;
|
||||||
|
s->longest_row= 0;
|
||||||
|
s->auto_increment= 0;
|
||||||
|
s->check_point= 0;
|
||||||
|
s->comment_start_pos= 0;
|
||||||
|
s->comment_length= 0;
|
||||||
|
s->frm_start_pos= 0;
|
||||||
|
s->frm_length= 0;
|
||||||
check_header(s); /* skip the .az header */
|
check_header(s); /* skip the .az header */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ int ha_archive::read_data_header(azio_stream *file_to_read)
|
|||||||
DBUG_PRINT("ha_archive", ("Version %u", data_buffer[1]));
|
DBUG_PRINT("ha_archive", ("Version %u", data_buffer[1]));
|
||||||
|
|
||||||
if ((data_buffer[0] != (uchar)ARCHIVE_CHECK_HEADER) &&
|
if ((data_buffer[0] != (uchar)ARCHIVE_CHECK_HEADER) &&
|
||||||
(data_buffer[1] != (uchar)ARCHIVE_VERSION))
|
(data_buffer[1] == 1 || data_buffer[1] == 2))
|
||||||
DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
|
DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
|
||||||
|
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
@ -360,9 +360,19 @@ ARCHIVE_SHARE *ha_archive::get_share(const char *table_name, int *rc)
|
|||||||
my_free(share, MYF(0));
|
my_free(share, MYF(0));
|
||||||
DBUG_RETURN(NULL);
|
DBUG_RETURN(NULL);
|
||||||
}
|
}
|
||||||
|
share->version= archive_tmp.version;
|
||||||
|
if (archive_tmp.version == ARCHIVE_VERSION)
|
||||||
|
{
|
||||||
stats.auto_increment_value= archive_tmp.auto_increment + 1;
|
stats.auto_increment_value= archive_tmp.auto_increment + 1;
|
||||||
share->rows_recorded= (ha_rows)archive_tmp.rows;
|
share->rows_recorded= (ha_rows)archive_tmp.rows;
|
||||||
share->crashed= archive_tmp.dirty;
|
share->crashed= archive_tmp.dirty;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Used by repair */
|
||||||
|
share->rows_recorded= ~(ha_rows) 0;
|
||||||
|
stats.auto_increment_value= 0;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
If archive version is less than 3, It should be upgraded before
|
If archive version is less than 3, It should be upgraded before
|
||||||
use.
|
use.
|
||||||
@ -512,10 +522,19 @@ int ha_archive::open(const char *name, int mode, uint open_options)
|
|||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
case HA_ERR_CRASHED_ON_USAGE:
|
case HA_ERR_CRASHED_ON_USAGE:
|
||||||
|
DBUG_PRINT("ha_archive", ("archive table was crashed"));
|
||||||
if (open_options & HA_OPEN_FOR_REPAIR)
|
if (open_options & HA_OPEN_FOR_REPAIR)
|
||||||
|
{
|
||||||
|
rc= 0;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case HA_ERR_TABLE_NEEDS_UPGRADE:
|
case HA_ERR_TABLE_NEEDS_UPGRADE:
|
||||||
|
if (open_options & HA_OPEN_FOR_REPAIR)
|
||||||
|
{
|
||||||
|
rc= 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
free_share();
|
free_share();
|
||||||
/* fall through */
|
/* fall through */
|
||||||
default:
|
default:
|
||||||
@ -535,13 +554,6 @@ int ha_archive::open(const char *name, int mode, uint open_options)
|
|||||||
|
|
||||||
thr_lock_data_init(&share->lock, &lock, NULL);
|
thr_lock_data_init(&share->lock, &lock, NULL);
|
||||||
|
|
||||||
DBUG_PRINT("ha_archive", ("archive table was crashed %s",
|
|
||||||
rc == HA_ERR_CRASHED_ON_USAGE ? "yes" : "no"));
|
|
||||||
if (rc == HA_ERR_CRASHED_ON_USAGE && open_options & HA_OPEN_FOR_REPAIR)
|
|
||||||
{
|
|
||||||
DBUG_RETURN(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
DBUG_RETURN(rc);
|
DBUG_RETURN(rc);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1267,6 +1279,14 @@ int ha_archive::rnd_pos(uchar * buf, uchar *pos)
|
|||||||
DBUG_RETURN(get_row(&archive, buf));
|
DBUG_RETURN(get_row(&archive, buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ha_archive::check_for_upgrade(HA_CHECK_OPT *check_opt)
|
||||||
|
{
|
||||||
|
if (share->version < ARCHIVE_VERSION)
|
||||||
|
return HA_ADMIN_NEEDS_ALTER;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This method repairs the meta file. It does this by walking the datafile and
|
This method repairs the meta file. It does this by walking the datafile and
|
||||||
rewriting the meta file. If EXTENDED repair is requested, we attempt to
|
rewriting the meta file. If EXTENDED repair is requested, we attempt to
|
||||||
|
@ -35,7 +35,7 @@ typedef struct st_archive_record_buffer {
|
|||||||
typedef struct st_archive_share {
|
typedef struct st_archive_share {
|
||||||
char *table_name;
|
char *table_name;
|
||||||
char data_file_name[FN_REFLEN];
|
char data_file_name[FN_REFLEN];
|
||||||
uint table_name_length,use_count;
|
uint table_name_length,use_count, version;
|
||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
THR_LOCK lock;
|
THR_LOCK lock;
|
||||||
azio_stream archive_write; /* Archive file we are working with */
|
azio_stream archive_write; /* Archive file we are working with */
|
||||||
@ -133,6 +133,7 @@ public:
|
|||||||
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info);
|
int create(const char *name, TABLE *form, HA_CREATE_INFO *create_info);
|
||||||
int optimize(THD* thd, HA_CHECK_OPT* check_opt);
|
int optimize(THD* thd, HA_CHECK_OPT* check_opt);
|
||||||
int repair(THD* thd, HA_CHECK_OPT* check_opt);
|
int repair(THD* thd, HA_CHECK_OPT* check_opt);
|
||||||
|
int check_for_upgrade(HA_CHECK_OPT *check_opt);
|
||||||
void start_bulk_insert(ha_rows rows);
|
void start_bulk_insert(ha_rows rows);
|
||||||
int end_bulk_insert();
|
int end_bulk_insert();
|
||||||
enum row_type get_row_type() const
|
enum row_type get_row_type() const
|
||||||
|
@ -2967,10 +2967,13 @@ int ha_federatedx::rnd_pos(uchar *buf, uchar *pos)
|
|||||||
DBUG_ENTER("ha_federatedx::rnd_pos");
|
DBUG_ENTER("ha_federatedx::rnd_pos");
|
||||||
ha_statistic_increment(&SSV::ha_read_rnd_count);
|
ha_statistic_increment(&SSV::ha_read_rnd_count);
|
||||||
|
|
||||||
|
/* We have to move this to 'ref' to get things aligned */
|
||||||
|
bmove(ref, pos, ref_length);
|
||||||
|
|
||||||
if ((retval= txn->acquire(share, TRUE, &io)))
|
if ((retval= txn->acquire(share, TRUE, &io)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if ((retval= io->seek_position(&result, pos)))
|
if ((retval= io->seek_position(&result, ref)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
retval= read_next(buf, result);
|
retval= read_next(buf, result);
|
||||||
|
@ -1,3 +1,128 @@
|
|||||||
|
2010-06-24 The InnoDB Team
|
||||||
|
|
||||||
|
* handler/ha_innodb.cc:
|
||||||
|
Fix Bug#54679 alter table causes compressed row_format to revert
|
||||||
|
to compact
|
||||||
|
|
||||||
|
2010-06-22 The InnoDB Team
|
||||||
|
|
||||||
|
* dict/dict0dict.c, dict/dict0mem.c, include/dict0mem.h,
|
||||||
|
include/univ.i, page/page0zip.c, row/row0merge.c:
|
||||||
|
Fix Bug#47991 InnoDB Dictionary Cache memory usage increases
|
||||||
|
indefinitely when renaming tables
|
||||||
|
|
||||||
|
2010-06-22 The InnoDB Team
|
||||||
|
|
||||||
|
* handler/ha_innodb.cc:
|
||||||
|
Fix Bug#54686: "field->col->mtype == type" assertion error at
|
||||||
|
row/row0sel.c
|
||||||
|
|
||||||
|
2010-06-22 The InnoDB Team
|
||||||
|
|
||||||
|
* handler/ha_innodb.cc, innodb_bug54044.result, innodb_bug54044.test:
|
||||||
|
Fix Bug#54044 Create temporary tables and using innodb crashes.
|
||||||
|
|
||||||
|
2010-06-21 The InnoDB Team
|
||||||
|
|
||||||
|
* dict/dict0load.c, fil/fil0fil.c:
|
||||||
|
Fix Bug#54658: InnoDB: Warning: allocated tablespace %lu,
|
||||||
|
old maximum was 0 (introduced in Bug #53578 fix)
|
||||||
|
|
||||||
|
2010-06-16 The InnoDB Team
|
||||||
|
|
||||||
|
* row/row0merge.c:
|
||||||
|
Fix Bug#54330 Broken fast index creation
|
||||||
|
|
||||||
|
2010-06-10 The InnoDB Team
|
||||||
|
|
||||||
|
* include/log0log.ic, row/row0ins.c, row/row0purge.c,
|
||||||
|
row/row0uins.c, row/row0umod.c, row/row0upd.c:
|
||||||
|
Fix Bug#39168 ERROR: the age of the last checkpoint ... exceeds
|
||||||
|
the log group capacity
|
||||||
|
|
||||||
|
2010-06-08 The InnoDB Team
|
||||||
|
|
||||||
|
* dict/dict0load.c:
|
||||||
|
Fix Bug#54009 Server crashes when data is selected from non backed
|
||||||
|
up table for InnoDB plugin
|
||||||
|
|
||||||
|
2010-06-02 The InnoDB Team
|
||||||
|
|
||||||
|
* include/db0err.h, include/lock0lock.h, include/row0mysql.h,
|
||||||
|
lock/lock0lock.c, row/row0ins.c, row/row0mysql.c, row/row0sel.c:
|
||||||
|
Fix Bug#53674 InnoDB: Error: unlock row could not find a
|
||||||
|
4 mode lock on the record
|
||||||
|
|
||||||
|
2010-06-01 The InnoDB Team
|
||||||
|
|
||||||
|
* include/sync0rw.h, sync/sync0rw.c:
|
||||||
|
Fix Bug#48197 Concurrent rw_lock_free may cause assertion failure
|
||||||
|
|
||||||
|
2010-06-01 The InnoDB Team
|
||||||
|
|
||||||
|
* row/row0umod.c:
|
||||||
|
Fix Bug#53812 assert row/row0umod.c line 660 in txn rollback
|
||||||
|
after crash recovery
|
||||||
|
|
||||||
|
2010-05-25 The InnoDB Team
|
||||||
|
|
||||||
|
* handler/ha_innodb.cc, include/row0mysql.h, row/row0mysql.c:
|
||||||
|
Fix Bug#53592: crash replacing duplicates into table after fast
|
||||||
|
alter table added unique key
|
||||||
|
|
||||||
|
2010-05-24 The InnoDB Team
|
||||||
|
|
||||||
|
* dict/dict0boot.c, dict/dict0crea.c, fil/fil0fil.c,
|
||||||
|
include/dict0boot.h, include/fil0fil.h, row/row0mysql.c:
|
||||||
|
Fix Bug#53578: assert on invalid page access, in fil_io()
|
||||||
|
|
||||||
|
2010-05-14 The InnoDB Team
|
||||||
|
* mysql-test/innodb_bug48024.test, mysql-test/innodb_bug48024.result,
|
||||||
|
dict/dict0dict.c, handler/ha_innodb.cc, handler/ha_innodb.h,
|
||||||
|
include/dict0dict.h, include/ha_prototypes.h, include/row0mysql.h,
|
||||||
|
include/trx0trx.h, row/row0mysql.c, trx/trx0i_s.c, trx/trx0trx.c:
|
||||||
|
Fix Bug#48024 Innodb doesn't work with multi-statements
|
||||||
|
Fix Bug#53644 InnoDB thinks that /*/ starts and ends a comment
|
||||||
|
|
||||||
|
2010-05-12 The InnoDB Team
|
||||||
|
|
||||||
|
* handler/handler0alter.cc:
|
||||||
|
Fix Bug#53591 crash with fast alter table and text/blob prefix
|
||||||
|
primary key
|
||||||
|
|
||||||
|
2010-05-12 The InnoDB Team
|
||||||
|
|
||||||
|
* row/row0merge.c:
|
||||||
|
Fix Bug#53471 row_merge_drop_temp_indexes() refers freed memory, SEGVs
|
||||||
|
|
||||||
|
2010-05-11 The InnoDB Team
|
||||||
|
|
||||||
|
* mysql-test/innodb_bug53290.test, mysql-test/innodb_bug53290.result,
|
||||||
|
include/rem0cmp.h, rem/rem0cmp.c, row/row0merge.c:
|
||||||
|
Fix Bug#53290 wrong duplicate key error when adding a unique index
|
||||||
|
via fast alter table
|
||||||
|
|
||||||
|
2010-05-11 The InnoDB Team
|
||||||
|
* buf/buf0lru.c, include/buf0buf.ic:
|
||||||
|
Fix Bug#53307 valgrind: warnings in main.partition_innodb_plugin
|
||||||
|
|
||||||
|
2010-05-05 The InnoDB Team
|
||||||
|
|
||||||
|
* row/row0merge.c:
|
||||||
|
Fix Bug#53256 in a stress test, assert dict/dict0dict.c:815
|
||||||
|
table2 == NULL
|
||||||
|
|
||||||
|
2010-05-05 The InnoDB Team
|
||||||
|
|
||||||
|
* handler/ha_innodb.cc:
|
||||||
|
Fix Bug#53165 Setting innodb_change_buffering=DEFAULT produces
|
||||||
|
incorrect result
|
||||||
|
|
||||||
|
2010-05-04 The InnoDB Team
|
||||||
|
|
||||||
|
* fsp/fsp0fsp.c:
|
||||||
|
Fix Bug#53306 valgrind: warnings in innodb.innodb
|
||||||
|
|
||||||
2010-05-03 The InnoDB Team
|
2010-05-03 The InnoDB Team
|
||||||
|
|
||||||
* buf0buf.c:
|
* buf0buf.c:
|
||||||
@ -48,12 +173,6 @@
|
|||||||
Only check the record size at index creation time when
|
Only check the record size at index creation time when
|
||||||
innodb_strict_mode is set or when ROW_FORMAT is DYNAMIC or COMPRESSED.
|
innodb_strict_mode is set or when ROW_FORMAT is DYNAMIC or COMPRESSED.
|
||||||
|
|
||||||
2010-04-20 The InnoDB Team
|
|
||||||
|
|
||||||
* btr/btr0btr.c, include/univ.i:
|
|
||||||
Implement UNIV_BTR_AVOID_COPY, for avoiding writes when a B-tree
|
|
||||||
node is split at the first or last record.
|
|
||||||
|
|
||||||
2010-04-15 The InnoDB Team
|
2010-04-15 The InnoDB Team
|
||||||
|
|
||||||
* trx/trx0rec.c:
|
* trx/trx0rec.c:
|
||||||
@ -72,6 +191,10 @@
|
|||||||
* mysql-test/innodb_bug38231.test:
|
* mysql-test/innodb_bug38231.test:
|
||||||
Remove non-determinism in the test case.
|
Remove non-determinism in the test case.
|
||||||
|
|
||||||
|
2010-03-29 The InnoDB Team
|
||||||
|
|
||||||
|
InnoDB Plugin 1.0.7 released
|
||||||
|
|
||||||
2010-03-18 The InnoDB Team
|
2010-03-18 The InnoDB Team
|
||||||
|
|
||||||
* CMakeLists.txt:
|
* CMakeLists.txt:
|
||||||
@ -194,6 +317,14 @@
|
|||||||
Fix Bug#49497 Error 1467 (ER_AUTOINC_READ_FAILED) on inserting
|
Fix Bug#49497 Error 1467 (ER_AUTOINC_READ_FAILED) on inserting
|
||||||
a negative value
|
a negative value
|
||||||
|
|
||||||
|
2010-01-28 The InnoDB Team
|
||||||
|
* handler/ha_innodb.h, handler/ha_innodb.cc,
|
||||||
|
handler/handler0alter.cc,
|
||||||
|
mysql-test/innodb_bug47622.test,
|
||||||
|
mysql-test/innodb_bug47622.result:
|
||||||
|
Fix Bug#47622 the new index is added before the existing ones
|
||||||
|
in MySQL, but after one in SE
|
||||||
|
|
||||||
2010-01-27 The InnoDB Team
|
2010-01-27 The InnoDB Team
|
||||||
|
|
||||||
* include/row0mysql.h, log/log0recv.c, row/row0mysql.c:
|
* include/row0mysql.h, log/log0recv.c, row/row0mysql.c:
|
||||||
|
@ -2030,6 +2030,7 @@ func_start:
|
|||||||
goto insert_empty;
|
goto insert_empty;
|
||||||
}
|
}
|
||||||
} else if (UNIV_UNLIKELY(insert_left)) {
|
} else if (UNIV_UNLIKELY(insert_left)) {
|
||||||
|
ut_a(n_iterations > 0);
|
||||||
first_rec = page_rec_get_next(page_get_infimum_rec(page));
|
first_rec = page_rec_get_next(page_get_infimum_rec(page));
|
||||||
move_limit = page_rec_get_next(btr_cur_get_rec(cursor));
|
move_limit = page_rec_get_next(btr_cur_get_rec(cursor));
|
||||||
} else {
|
} else {
|
||||||
@ -2076,17 +2077,7 @@ insert_empty:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 5. Move then the records to the new page */
|
/* 5. Move then the records to the new page */
|
||||||
if (direction == FSP_DOWN
|
if (direction == FSP_DOWN) {
|
||||||
#ifdef UNIV_BTR_AVOID_COPY
|
|
||||||
&& page_rec_is_supremum(move_limit)) {
|
|
||||||
/* Instead of moving all records, make the new page
|
|
||||||
the empty page. */
|
|
||||||
|
|
||||||
left_block = block;
|
|
||||||
right_block = new_block;
|
|
||||||
} else if (direction == FSP_DOWN
|
|
||||||
#endif /* UNIV_BTR_AVOID_COPY */
|
|
||||||
) {
|
|
||||||
/* fputs("Split left\n", stderr); */
|
/* fputs("Split left\n", stderr); */
|
||||||
|
|
||||||
if (0
|
if (0
|
||||||
@ -2129,14 +2120,6 @@ insert_empty:
|
|||||||
right_block = block;
|
right_block = block;
|
||||||
|
|
||||||
lock_update_split_left(right_block, left_block);
|
lock_update_split_left(right_block, left_block);
|
||||||
#ifdef UNIV_BTR_AVOID_COPY
|
|
||||||
} else if (!split_rec) {
|
|
||||||
/* Instead of moving all records, make the new page
|
|
||||||
the empty page. */
|
|
||||||
|
|
||||||
left_block = new_block;
|
|
||||||
right_block = block;
|
|
||||||
#endif /* UNIV_BTR_AVOID_COPY */
|
|
||||||
} else {
|
} else {
|
||||||
/* fputs("Split right\n", stderr); */
|
/* fputs("Split right\n", stderr); */
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user