mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
Auto-merge from mysql-5.5-bugteam.
This commit is contained in:
commit
bde1955104
140 changed files with 2439 additions and 1597 deletions
|
@ -13,11 +13,6 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
#define COPYRIGHT_NOTICE "\
|
|
||||||
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.\n\
|
|
||||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
|
|
||||||
and you are welcome to modify and redistribute it under the GPL v2 license\n"
|
|
||||||
|
|
||||||
/* mysql command tool
|
/* mysql command tool
|
||||||
* Commands compatible with mSQL by David J. Hughes
|
* Commands compatible with mSQL by David J. Hughes
|
||||||
*
|
*
|
||||||
|
@ -110,6 +105,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "completion_hash.h"
|
#include "completion_hash.h"
|
||||||
|
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||||
|
|
||||||
#define PROMPT_CHAR '\\'
|
#define PROMPT_CHAR '\\'
|
||||||
#define DEFAULT_DELIMITER ";"
|
#define DEFAULT_DELIMITER ";"
|
||||||
|
@ -1177,7 +1173,7 @@ int main(int argc,char *argv[])
|
||||||
mysql_thread_id(&mysql), server_version_string(&mysql));
|
mysql_thread_id(&mysql), server_version_string(&mysql));
|
||||||
put_info((char*) glob_buffer.ptr(),INFO_INFO);
|
put_info((char*) glob_buffer.ptr(),INFO_INFO);
|
||||||
|
|
||||||
put_info(COPYRIGHT_NOTICE, INFO_INFO);
|
put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"), INFO_INFO);
|
||||||
|
|
||||||
#ifdef HAVE_READLINE
|
#ifdef HAVE_READLINE
|
||||||
initialize_readline((char*) my_progname);
|
initialize_readline((char*) my_progname);
|
||||||
|
@ -1595,7 +1591,7 @@ static void usage(int version)
|
||||||
|
|
||||||
if (version)
|
if (version)
|
||||||
return;
|
return;
|
||||||
printf("%s", COPYRIGHT_NOTICE);
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||||
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
|
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
|
||||||
my_print_help(my_long_options);
|
my_print_help(my_long_options);
|
||||||
print_defaults("my", load_default_groups);
|
print_defaults("my", load_default_groups);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2000 MySQL AB
|
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
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,6 +17,8 @@
|
||||||
#include <sslopt-vars.h>
|
#include <sslopt-vars.h>
|
||||||
#include "../scripts/mysql_fix_privilege_tables_sql.c"
|
#include "../scripts/mysql_fix_privilege_tables_sql.c"
|
||||||
|
|
||||||
|
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||||
|
|
||||||
#define VER "1.1"
|
#define VER "1.1"
|
||||||
|
|
||||||
#ifdef HAVE_SYS_WAIT_H
|
#ifdef HAVE_SYS_WAIT_H
|
||||||
|
@ -232,6 +234,7 @@ get_one_option(int optid, const struct my_option *opt,
|
||||||
case '?':
|
case '?':
|
||||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",
|
printf("%s Ver %s Distrib %s, for %s (%s)\n",
|
||||||
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
|
my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
|
||||||
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||||
puts("MySQL utility for upgrading databases to new MySQL versions.\n");
|
puts("MySQL utility for upgrading databases to new MySQL versions.\n");
|
||||||
my_print_help(my_long_options);
|
my_print_help(my_long_options);
|
||||||
exit(0);
|
exit(0);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2000-2006 MySQL AB
|
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
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
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <mysql.h>
|
#include <mysql.h>
|
||||||
#include <sql_common.h>
|
#include <sql_common.h>
|
||||||
|
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||||
|
|
||||||
#define ADMIN_VERSION "8.42"
|
#define ADMIN_VERSION "8.42"
|
||||||
#define MAX_MYSQL_VAR 512
|
#define MAX_MYSQL_VAR 512
|
||||||
|
@ -671,8 +672,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||||
case ADMIN_VER:
|
case ADMIN_VER:
|
||||||
new_line=1;
|
new_line=1;
|
||||||
print_version();
|
print_version();
|
||||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
|
||||||
printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
|
printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
|
||||||
printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
|
printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
|
||||||
printf("Connection\t\t%s\n",mysql_get_host_info(mysql));
|
printf("Connection\t\t%s\n",mysql_get_host_info(mysql));
|
||||||
|
@ -1070,8 +1070,7 @@ static void print_version(void)
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
print_version();
|
print_version();
|
||||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
|
||||||
puts("Administration program for the mysqld daemon.");
|
puts("Administration program for the mysqld daemon.");
|
||||||
printf("Usage: %s [OPTIONS] command command....\n", my_progname);
|
printf("Usage: %s [OPTIONS] command command....\n", my_progname);
|
||||||
my_print_help(my_long_options);
|
my_print_help(my_long_options);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2001-2004 MySQL AB
|
/* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
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
|
||||||
|
@ -34,6 +34,7 @@
|
||||||
#include "sql_priv.h"
|
#include "sql_priv.h"
|
||||||
#include "log_event.h"
|
#include "log_event.h"
|
||||||
#include "sql_common.h"
|
#include "sql_common.h"
|
||||||
|
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||||
|
|
||||||
#define BIN_LOG_HEADER_SIZE 4
|
#define BIN_LOG_HEADER_SIZE 4
|
||||||
#define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4)
|
#define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4)
|
||||||
|
@ -1239,10 +1240,7 @@ static void print_version()
|
||||||
static void usage()
|
static void usage()
|
||||||
{
|
{
|
||||||
print_version();
|
print_version();
|
||||||
puts("By Monty and Sasha, for your professional use\n\
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2001, 2010"));
|
||||||
This software comes with NO WARRANTY: This is free software,\n\
|
|
||||||
and you are welcome to modify and redistribute it under the GPL license.\n");
|
|
||||||
|
|
||||||
printf("\
|
printf("\
|
||||||
Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
|
Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
|
||||||
the mysql command line client.\n\n");
|
the mysql command line client.\n\n");
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2000 MySQL AB, 2009 Sun Microsystems, Inc
|
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
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
|
||||||
|
@ -13,8 +13,6 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
/* By Jani Tolonen, 2001-04-20, MySQL Development Team */
|
|
||||||
|
|
||||||
#define CHECK_VERSION "2.5.0"
|
#define CHECK_VERSION "2.5.0"
|
||||||
|
|
||||||
#include "client_priv.h"
|
#include "client_priv.h"
|
||||||
|
@ -22,6 +20,7 @@
|
||||||
#include <mysql_version.h>
|
#include <mysql_version.h>
|
||||||
#include <mysqld_error.h>
|
#include <mysqld_error.h>
|
||||||
#include <sslopt-vars.h>
|
#include <sslopt-vars.h>
|
||||||
|
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||||
|
|
||||||
/* Exit codes */
|
/* Exit codes */
|
||||||
|
|
||||||
|
@ -48,7 +47,7 @@ static char *shared_memory_base_name=0;
|
||||||
#endif
|
#endif
|
||||||
static uint opt_protocol=0;
|
static uint opt_protocol=0;
|
||||||
|
|
||||||
enum operations { DO_CHECK, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_UPGRADE };
|
enum operations { DO_CHECK=1, DO_REPAIR, DO_ANALYZE, DO_OPTIMIZE, DO_UPGRADE };
|
||||||
|
|
||||||
static struct my_option my_long_options[] =
|
static struct my_option my_long_options[] =
|
||||||
{
|
{
|
||||||
|
@ -215,9 +214,7 @@ static void print_version(void)
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
print_version();
|
print_version();
|
||||||
puts("By Jani Tolonen, 2001-04-20, MySQL Development Team.\n");
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n");
|
|
||||||
puts("and you are welcome to modify and redistribute it under the GPL license.\n");
|
|
||||||
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.");
|
||||||
|
@ -244,6 +241,8 @@ static my_bool
|
||||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||||
char *argument)
|
char *argument)
|
||||||
{
|
{
|
||||||
|
int orig_what_to_do= what_to_do;
|
||||||
|
|
||||||
switch(optid) {
|
switch(optid) {
|
||||||
case 'a':
|
case 'a':
|
||||||
what_to_do = DO_ANALYZE;
|
what_to_do = DO_ANALYZE;
|
||||||
|
@ -318,6 +317,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||||
opt->name);
|
opt->name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (orig_what_to_do && (what_to_do != orig_what_to_do))
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Error: %s doesn't support multiple contradicting commands.\n",
|
||||||
|
my_progname);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright 2000-2008 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
|
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
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
|
||||||
|
@ -51,6 +51,8 @@
|
||||||
#include "mysql_version.h"
|
#include "mysql_version.h"
|
||||||
#include "mysqld_error.h"
|
#include "mysqld_error.h"
|
||||||
|
|
||||||
|
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||||
|
|
||||||
/* Exit codes */
|
/* Exit codes */
|
||||||
|
|
||||||
#define EX_USAGE 1
|
#define EX_USAGE 1
|
||||||
|
@ -584,8 +586,7 @@ static void short_usage_sub(void)
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
print_version();
|
print_version();
|
||||||
puts("By Igor Romanenko, Monty, Jani & Sinisa.");
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
|
|
||||||
puts("Dumping structure and contents of MySQL databases and tables.");
|
puts("Dumping structure and contents of MySQL databases and tables.");
|
||||||
short_usage_sub();
|
short_usage_sub();
|
||||||
print_defaults("my",load_default_groups);
|
print_defaults("my",load_default_groups);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2000-2006 MySQL AB, 2009 Sun Microsystems, Inc.
|
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
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
|
||||||
|
@ -32,6 +32,8 @@
|
||||||
#include <my_pthread.h>
|
#include <my_pthread.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||||
|
|
||||||
|
|
||||||
/* Global Thread counter */
|
/* Global Thread counter */
|
||||||
uint counter;
|
uint counter;
|
||||||
|
@ -191,8 +193,7 @@ static void print_version(void)
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
print_version();
|
print_version();
|
||||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
|
|
||||||
printf("\
|
printf("\
|
||||||
Loads tables from text files in various formats. The base name of the\n\
|
Loads tables from text files in various formats. The base name of the\n\
|
||||||
text file must be the name of the table that should be used.\n\
|
text file must be the name of the table that should be used.\n\
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2000-2006 MySQL AB
|
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
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
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <sslopt-vars.h>
|
#include <sslopt-vars.h>
|
||||||
|
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||||
|
|
||||||
static char * host=0, *opt_password=0, *user=0;
|
static char * host=0, *opt_password=0, *user=0;
|
||||||
static my_bool opt_show_keys= 0, opt_compress= 0, opt_count=0, opt_status= 0;
|
static my_bool opt_show_keys= 0, opt_compress= 0, opt_count=0, opt_status= 0;
|
||||||
|
@ -247,8 +248,7 @@ static void print_version(void)
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
print_version();
|
print_version();
|
||||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010)"));
|
||||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
|
|
||||||
puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
|
puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
|
||||||
printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
|
printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
|
||||||
puts("\n\
|
puts("\n\
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2005 MySQL AB, 2009 Sun Microsystems, Inc.
|
/* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
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
|
||||||
|
@ -11,12 +11,7 @@
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
original idea: Brian Aker via playing with ab for too many years
|
|
||||||
coded by: Patrick Galbraith
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
MySQL Slap
|
MySQL Slap
|
||||||
|
@ -94,6 +89,7 @@ TODO:
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#endif
|
#endif
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||||
|
|
||||||
#ifdef __WIN__
|
#ifdef __WIN__
|
||||||
#define srandom srand
|
#define srandom srand
|
||||||
|
@ -686,8 +682,7 @@ static void print_version(void)
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
print_version();
|
print_version();
|
||||||
puts("Copyright (C) 2005 MySQL AB");
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005, 2010"));
|
||||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license.\n");
|
|
||||||
puts("Run a query multiple times against the server.\n");
|
puts("Run a query multiple times against the server.\n");
|
||||||
printf("Usage: %s [OPTIONS]\n",my_progname);
|
printf("Usage: %s [OPTIONS]\n",my_progname);
|
||||||
print_defaults("my",load_default_groups);
|
print_defaults("my",load_default_groups);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* Copyright (C) 2000 MySQL AB
|
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
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
|
||||||
|
@ -52,6 +52,8 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <my_stacktrace.h>
|
#include <my_stacktrace.h>
|
||||||
|
|
||||||
|
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||||
|
|
||||||
#ifdef __WIN__
|
#ifdef __WIN__
|
||||||
#include <crtdbg.h>
|
#include <crtdbg.h>
|
||||||
#define SIGNAL_FMT "exception 0x%x"
|
#define SIGNAL_FMT "exception 0x%x"
|
||||||
|
@ -6260,8 +6262,7 @@ void print_version(void)
|
||||||
void usage()
|
void usage()
|
||||||
{
|
{
|
||||||
print_version();
|
print_version();
|
||||||
printf("MySQL AB, by Sasha, Matt, Monty & Jani\n");
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||||
printf("This software comes with ABSOLUTELY NO WARRANTY\n\n");
|
|
||||||
printf("Runs a test against the mysql server and compares output with a results file.\n\n");
|
printf("Runs a test against the mysql server and compares output with a results file.\n\n");
|
||||||
printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
|
printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
|
||||||
my_print_help(my_long_options);
|
my_print_help(my_long_options);
|
||||||
|
|
|
@ -131,12 +131,12 @@ IF(UNIX)
|
||||||
|
|
||||||
# Default GCC flags
|
# Default GCC flags
|
||||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||||
SET(COMMON_C_FLAGS "-g -static-libgcc -fno-omit-frame-pointer")
|
SET(COMMON_C_FLAGS "-g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing")
|
||||||
SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}")
|
SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}")
|
||||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
|
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
SET(COMMON_CXX_FLAGS "-g -static-libgcc -fno-omit-frame-pointer")
|
SET(COMMON_CXX_FLAGS "-g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing")
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}")
|
SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}")
|
||||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
|
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -176,9 +176,9 @@ IF(UNIX)
|
||||||
|
|
||||||
# OSX flags
|
# OSX flags
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
SET(COMMON_C_FLAGS "-g -fno-common")
|
SET(COMMON_C_FLAGS "-g -fno-common -fno-strict-aliasing")
|
||||||
# XXX: why are we using -felide-constructors on OSX?
|
# XXX: why are we using -felide-constructors on OSX?
|
||||||
SET(COMMON_CXX_FLAGS "-g -fno-common -felide-constructors")
|
SET(COMMON_CXX_FLAGS "-g -fno-common -felide-constructors -fno-strict-aliasing")
|
||||||
SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}")
|
SET(CMAKE_C_FLAGS_DEBUG "-O ${COMMON_C_FLAGS}")
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}")
|
SET(CMAKE_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}")
|
||||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${COMMON_C_FLAGS}")
|
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${COMMON_C_FLAGS}")
|
||||||
|
|
|
@ -59,13 +59,16 @@
|
||||||
# - INSTALL_SUPPORTFILESDIR (various extra support files)
|
# - INSTALL_SUPPORTFILESDIR (various extra support files)
|
||||||
#
|
#
|
||||||
# - INSTALL_MYSQLDATADIR (data directory)
|
# - INSTALL_MYSQLDATADIR (data directory)
|
||||||
|
#
|
||||||
|
# When changing this page, _please_ do not forget to update public Wiki
|
||||||
|
# http://forge.mysql.com/wiki/CMake#Fine-tuning_installation_paths
|
||||||
|
|
||||||
IF(NOT INSTALL_LAYOUT)
|
IF(NOT INSTALL_LAYOUT)
|
||||||
SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
|
SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
|
SET(INSTALL_LAYOUT "${DEFAULT_INSTALL_LAYOUT}"
|
||||||
CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer) or UNIX")
|
CACHE STRING "Installation directory layout. Options are: STANDALONE (as in zip or tar.gz installer), RPM, DEB, SVR4")
|
||||||
|
|
||||||
IF(UNIX)
|
IF(UNIX)
|
||||||
IF(INSTALL_LAYOUT MATCHES "RPM")
|
IF(INSTALL_LAYOUT MATCHES "RPM")
|
||||||
|
@ -83,6 +86,13 @@ IF(UNIX)
|
||||||
SET(CMAKE_INSTALL_PREFIX ${default_prefix}
|
SET(CMAKE_INSTALL_PREFIX ${default_prefix}
|
||||||
CACHE PATH "install prefix" FORCE)
|
CACHE PATH "install prefix" FORCE)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
SET(VALID_INSTALL_LAYOUTS "RPM" "STANDALONE" "DEB" "SVR5")
|
||||||
|
LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" ind)
|
||||||
|
IF(ind EQUAL -1)
|
||||||
|
MESSAGE(FATAL_ERROR "Invalid INSTALL_LAYOUT parameter:${INSTALL_LAYOUT}."
|
||||||
|
" Choose between ${VALID_INSTALL_LAYOUTS}" )
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
|
SET(SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc"
|
||||||
CACHE PATH "config directory (for my.cnf)")
|
CACHE PATH "config directory (for my.cnf)")
|
||||||
MARK_AS_ADVANCED(SYSCONFDIR)
|
MARK_AS_ADVANCED(SYSCONFDIR)
|
||||||
|
|
|
@ -87,7 +87,6 @@ sinclude(config/ac-macros/character_sets.m4)
|
||||||
sinclude(config/ac-macros/compiler_flag.m4)
|
sinclude(config/ac-macros/compiler_flag.m4)
|
||||||
sinclude(config/ac-macros/plugins.m4)
|
sinclude(config/ac-macros/plugins.m4)
|
||||||
sinclude(config/ac-macros/dtrace.m4)
|
sinclude(config/ac-macros/dtrace.m4)
|
||||||
sinclude(config/ac-macros/ha_ndbcluster.m4)
|
|
||||||
sinclude(config/ac-macros/large_file.m4)
|
sinclude(config/ac-macros/large_file.m4)
|
||||||
sinclude(config/ac-macros/misc.m4)
|
sinclude(config/ac-macros/misc.m4)
|
||||||
sinclude(config/ac-macros/readline.m4)
|
sinclude(config/ac-macros/readline.m4)
|
||||||
|
|
31
include/welcome_copyright_notice.h
Normal file
31
include/welcome_copyright_notice.h
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||||
|
|
||||||
|
#ifndef _welcome_copyright_notice_h_
|
||||||
|
#define _welcome_copyright_notice_h_
|
||||||
|
|
||||||
|
/*
|
||||||
|
This define specifies copyright notice which is displayed by every MySQL
|
||||||
|
program on start, or on help screen.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define ORACLE_WELCOME_COPYRIGHT_NOTICE(years) \
|
||||||
|
"Copyright (c) " years ", Oracle and/or its affiliates. All rights reserved.\n" \
|
||||||
|
"\n" \
|
||||||
|
"Oracle is a registered trademark of Oracle Corporation and/or its\n" \
|
||||||
|
"affiliates. Other names may be trademarks of their respective\n" \
|
||||||
|
"owners.\n"
|
||||||
|
|
||||||
|
#endif /* _welcome_copyright_notice_h_ */
|
|
@ -15,9 +15,6 @@ main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_m
|
||||||
main.lock_multi_bug38691 @solaris # Bug#47792 2009-10-02 alik main.lock_multi_bug38691 times out sporadically on Solaris 10
|
main.lock_multi_bug38691 @solaris # Bug#47792 2009-10-02 alik main.lock_multi_bug38691 times out sporadically on Solaris 10
|
||||||
main.log_tables # Bug#47924 2009-10-08 alik main.log_tables times out sporadically
|
main.log_tables # Bug#47924 2009-10-08 alik main.log_tables times out sporadically
|
||||||
main.lowercase_table2 @darwin # Bug#55509 2010-07-26 alik main.lowercase_table2 fails on Mac OSX (again)
|
main.lowercase_table2 @darwin # Bug#55509 2010-07-26 alik main.lowercase_table2 fails on Mac OSX (again)
|
||||||
main.mysqlbinlog_row @solaris # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
|
|
||||||
main.mysqlbinlog_row_innodb @solaris # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
|
|
||||||
main.mysqlbinlog_row_myisam @solaris # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
|
|
||||||
main.outfile_loaddata @solaris # Bug#46895 2010-01-20 alik Test "outfile_loaddata" fails (reproducible)
|
main.outfile_loaddata @solaris # Bug#46895 2010-01-20 alik Test "outfile_loaddata" fails (reproducible)
|
||||||
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
main.signal_demo3 @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||||
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
main.sp @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||||
|
@ -29,7 +26,6 @@ rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails spora
|
||||||
rpl.rpl_innodb_bug28430* # Bug#46029
|
rpl.rpl_innodb_bug28430* # Bug#46029
|
||||||
rpl.rpl_innodb_bug30888* @solaris # Bug#47646 2009-09-25 alik rpl.rpl_innodb_bug30888 fails sporadically on Solaris
|
rpl.rpl_innodb_bug30888* @solaris # Bug#47646 2009-09-25 alik rpl.rpl_innodb_bug30888 fails sporadically on Solaris
|
||||||
rpl.rpl_killed_ddl @windows # Bug#47638 2010-01-20 alik The rpl_killed_ddl test fails on Windows
|
rpl.rpl_killed_ddl @windows # Bug#47638 2010-01-20 alik The rpl_killed_ddl test fails on Windows
|
||||||
rpl.rpl_row_sp011* @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
|
||||||
|
|
||||||
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
sys_vars.max_sp_recursion_depth_func @solaris # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
|
||||||
sys_vars.slow_query_log_func @solaris # Bug#54819 2010-06-26 alik sys_vars.slow_query_log_func fails sporadically on Solaris 10
|
sys_vars.slow_query_log_func @solaris # Bug#54819 2010-06-26 alik sys_vars.slow_query_log_func fails sporadically on Solaris 10
|
||||||
|
|
|
@ -21,9 +21,18 @@
|
||||||
# and slave are diverging.
|
# and slave are diverging.
|
||||||
#
|
#
|
||||||
########################################################################################
|
########################################################################################
|
||||||
|
|
||||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||||
|
|
||||||
|
let $old_max_binlog_cache_size= query_get_value(SHOW VARIABLES LIKE "max_binlog_cache_size", Value, 1);
|
||||||
|
let $old_binlog_cache_size= query_get_value(SHOW VARIABLES LIKE "binlog_cache_size", Value, 1);
|
||||||
|
|
||||||
|
SET GLOBAL max_binlog_cache_size = 4096;
|
||||||
|
# Becuase of bug#55377, we have to set binlog_cache_size until the bug is
|
||||||
|
# fixed.
|
||||||
|
SET GLOBAL binlog_cache_size = 4096;
|
||||||
|
disconnect master;
|
||||||
|
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||||
|
|
||||||
CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
||||||
CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
|
CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
|
||||||
CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
||||||
|
@ -50,13 +59,9 @@ eval INSERT INTO t2 (a, data) VALUES (2,
|
||||||
CONCAT($data, $data, $data, $data, $data, $data));
|
CONCAT($data, $data, $data, $data, $data, $data));
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
connection slave;
|
# Incident event
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_sql_errno=1590
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
START SLAVE SQL_THREAD;
|
|
||||||
--source include/wait_for_slave_sql_to_start.inc
|
|
||||||
|
|
||||||
connection master;
|
|
||||||
|
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
eval INSERT INTO t1 (a, data) VALUES (3, $data);
|
eval INSERT INTO t1 (a, data) VALUES (3, $data);
|
||||||
|
@ -74,23 +79,15 @@ eval UPDATE t2, t1 SET t2.data = CONCAT($data, $data, $data, $data),
|
||||||
t1.data = CONCAT($data, $data, $data, $data);
|
t1.data = CONCAT($data, $data, $data, $data);
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
connection slave;
|
# Incident event
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
--let $slave_skip_counter=1
|
||||||
|
|
||||||
if (`SELECT @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`)
|
|
||||||
{
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
|
||||||
}
|
|
||||||
if (`SELECT @@binlog_format = 'ROW'`)
|
if (`SELECT @@binlog_format = 'ROW'`)
|
||||||
{
|
{
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 2;
|
--inc $slave_skip_counter
|
||||||
}
|
}
|
||||||
START SLAVE SQL_THREAD;
|
--let $slave_sql_errno=1590
|
||||||
--source include/wait_for_slave_sql_to_start.inc
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
connection master;
|
--let $slave_skip_counter=
|
||||||
|
|
||||||
let $diff_statement= SELECT * FROM t1;
|
|
||||||
--source include/diff_master_slave.inc
|
|
||||||
|
|
||||||
--echo ########################################################################################
|
--echo ########################################################################################
|
||||||
--echo # 2 - BEGIN - IMPLICIT COMMIT by DDL
|
--echo # 2 - BEGIN - IMPLICIT COMMIT by DDL
|
||||||
|
@ -178,17 +175,6 @@ BEGIN;
|
||||||
CREATE TABLE t5 (a int);
|
CREATE TABLE t5 (a int);
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
if (`SELECT @@binlog_format = 'ROW'`)
|
|
||||||
{
|
|
||||||
connection slave;
|
|
||||||
--source include/wait_for_slave_sql_to_stop.inc
|
|
||||||
|
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
|
||||||
START SLAVE SQL_THREAD;
|
|
||||||
--source include/wait_for_slave_sql_to_start.inc
|
|
||||||
connection master;
|
|
||||||
}
|
|
||||||
|
|
||||||
let $diff_statement= SELECT * FROM t1;
|
let $diff_statement= SELECT * FROM t1;
|
||||||
--source include/diff_master_slave.inc
|
--source include/diff_master_slave.inc
|
||||||
|
|
||||||
|
@ -373,6 +359,70 @@ COMMIT;
|
||||||
let $diff_statement= SELECT * FROM t1;
|
let $diff_statement= SELECT * FROM t1;
|
||||||
--source include/diff_master_slave.inc
|
--source include/diff_master_slave.inc
|
||||||
|
|
||||||
|
--echo ########################################################################
|
||||||
|
--echo # 8 - Bug#55375(Regression Bug) Transaction bigger than
|
||||||
|
--echo # max_binlog_cache_size crashes slave
|
||||||
|
--echo ########################################################################
|
||||||
|
|
||||||
|
--echo # [ On Slave ]
|
||||||
|
SET GLOBAL max_binlog_cache_size = 4096;
|
||||||
|
SET GLOBAL binlog_cache_size = 4096;
|
||||||
|
|
||||||
|
source include/stop_slave.inc;
|
||||||
|
source include/start_slave.inc;
|
||||||
|
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
|
||||||
|
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
TRUNCATE t1;
|
||||||
|
|
||||||
|
sync_slave_with_master;
|
||||||
|
--let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1)
|
||||||
|
--let binlog_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
--replace_result $old_max_binlog_cache_size ORIGINAL_VALUE
|
||||||
|
--eval SET GLOBAL max_binlog_cache_size= $old_max_binlog_cache_size
|
||||||
|
--replace_result $old_binlog_cache_size ORIGINAL_VALUE
|
||||||
|
--eval SET GLOBAL binlog_cache_size= $old_binlog_cache_size
|
||||||
|
disconnect master;
|
||||||
|
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||||
|
|
||||||
|
--let $n=128
|
||||||
|
BEGIN;
|
||||||
|
--disable_query_log
|
||||||
|
--echo Repeat statement 'INSERT INTO t1 VALUES(\$n, repeat("a", 32))' $n times
|
||||||
|
while ($n)
|
||||||
|
{
|
||||||
|
--eval INSERT INTO t1 VALUES ($n, repeat("a", 32))
|
||||||
|
--dec $n
|
||||||
|
}
|
||||||
|
--enable_query_log
|
||||||
|
COMMIT;
|
||||||
|
|
||||||
|
connection slave;
|
||||||
|
--let $slave_sql_errno= 1197
|
||||||
|
if (`SELECT @@binlog_format = 'ROW'`)
|
||||||
|
{
|
||||||
|
--let $slave_sql_errno= 1534
|
||||||
|
}
|
||||||
|
source include/wait_for_slave_sql_error.inc;
|
||||||
|
|
||||||
|
SELECT count(*) FROM t1;
|
||||||
|
source include/show_binlog_events.inc;
|
||||||
|
|
||||||
|
--replace_result $old_max_binlog_cache_size ORIGINAL_VALUE
|
||||||
|
--eval SET GLOBAL max_binlog_cache_size= $old_max_binlog_cache_size
|
||||||
|
--replace_result $old_binlog_cache_size ORIGINAL_VALUE
|
||||||
|
--eval SET GLOBAL binlog_cache_size= $old_binlog_cache_size
|
||||||
|
|
||||||
|
source include/stop_slave.inc;
|
||||||
|
source include/start_slave.inc;
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
sync_slave_with_master;
|
||||||
|
SELECT count(*) FROM t1;
|
||||||
|
|
||||||
--echo ########################################################################################
|
--echo ########################################################################################
|
||||||
--echo # CLEAN
|
--echo # CLEAN
|
||||||
--echo ########################################################################################
|
--echo ########################################################################################
|
||||||
|
@ -385,4 +435,4 @@ DROP TABLE IF EXISTS t4;
|
||||||
DROP TABLE IF EXISTS t5;
|
DROP TABLE IF EXISTS t5;
|
||||||
DROP TABLE IF EXISTS t6;
|
DROP TABLE IF EXISTS t6;
|
||||||
DROP PROCEDURE p1;
|
DROP PROCEDURE p1;
|
||||||
sync_slave_with_master;
|
source include/master-slave-end.inc;
|
||||||
|
|
|
@ -1635,12 +1635,7 @@ CREATE TABLE t1 (a MEDIUMINT NULL) ENGINE=MYISAM;
|
||||||
INSERT INTO t1 VALUES (1234567);
|
INSERT INTO t1 VALUES (1234567);
|
||||||
SELECT GROUP_CONCAT(IFNULL(a,'')) FROM t1;
|
SELECT GROUP_CONCAT(IFNULL(a,'')) FROM t1;
|
||||||
SELECT GROUP_CONCAT(IF(a,a,'')) FROM t1;
|
SELECT GROUP_CONCAT(IF(a,a,'')) FROM t1;
|
||||||
if (`SELECT @@character_set_connection != 'ucs2'`)
|
SELECT GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END) FROM t1;
|
||||||
{
|
|
||||||
# Temporarily disable for ucs2
|
|
||||||
# For details, see Bug#55744 GROUP_CONCAT + CASE + ucs return garbage
|
|
||||||
SELECT GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END) FROM t1;
|
|
||||||
}
|
|
||||||
--enable_metadata
|
--enable_metadata
|
||||||
SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
|
SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
|
||||||
--disable_metadata
|
--disable_metadata
|
||||||
|
|
|
@ -351,3 +351,115 @@ explain select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 4
|
||||||
select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
|
select * from t1 where (key3 > 30 and key3<35) or (key2 >32 and key2 < 40);
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#56423: Different count with SELECT and CREATE SELECT queries
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
a INT,
|
||||||
|
b INT,
|
||||||
|
c INT,
|
||||||
|
d INT,
|
||||||
|
PRIMARY KEY (a),
|
||||||
|
KEY (c),
|
||||||
|
KEY bd (b,d)
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO t1 VALUES
|
||||||
|
(1, 0, 1, 0),
|
||||||
|
(2, 1, 1, 1),
|
||||||
|
(3, 1, 1, 1),
|
||||||
|
(4, 0, 1, 1);
|
||||||
|
|
||||||
|
EXPLAIN
|
||||||
|
SELECT a
|
||||||
|
FROM t1
|
||||||
|
WHERE c = 1 AND b = 1 AND d = 1;
|
||||||
|
|
||||||
|
CREATE TABLE t2 ( a INT )
|
||||||
|
SELECT a
|
||||||
|
FROM t1
|
||||||
|
WHERE c = 1 AND b = 1 AND d = 1;
|
||||||
|
|
||||||
|
SELECT * FROM t2;
|
||||||
|
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
CREATE TABLE t1( a INT, b INT, KEY(a), KEY(b) );
|
||||||
|
INSERT INTO t1 VALUES (1, 2), (1, 2), (1, 2), (1, 2);
|
||||||
|
SELECT * FROM t1 FORCE INDEX(a, b) WHERE a = 1 AND b = 2;
|
||||||
|
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo # Code coverage of fix.
|
||||||
|
CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT);
|
||||||
|
INSERT INTO t1 (b) VALUES (1);
|
||||||
|
UPDATE t1 SET b = 2 WHERE a = 1;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(1) );
|
||||||
|
INSERT INTO t2 (b) VALUES ('a');
|
||||||
|
UPDATE t2 SET b = 'b' WHERE a = 1;
|
||||||
|
SELECT * FROM t2;
|
||||||
|
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
# The test was inactive for InnoDB at the time of pushing. The following is
|
||||||
|
# expected result for the Bug#56423 test. It can be uncommented and pasted
|
||||||
|
# into result file when reactivating the test.
|
||||||
|
|
||||||
|
##
|
||||||
|
## Bug#56423: Different count with SELECT and CREATE SELECT queries
|
||||||
|
##
|
||||||
|
#CREATE TABLE t1 (
|
||||||
|
#a INT,
|
||||||
|
#b INT,
|
||||||
|
#c INT,
|
||||||
|
#d INT,
|
||||||
|
#PRIMARY KEY (a),
|
||||||
|
#KEY (c),
|
||||||
|
#KEY bd (b,d)
|
||||||
|
#);
|
||||||
|
#INSERT INTO t1 VALUES
|
||||||
|
#(1, 0, 1, 0),
|
||||||
|
#(2, 1, 1, 1),
|
||||||
|
#(3, 1, 1, 1),
|
||||||
|
#(4, 0, 1, 1);
|
||||||
|
#EXPLAIN
|
||||||
|
#SELECT a
|
||||||
|
#FROM t1
|
||||||
|
#WHERE c = 1 AND b = 1 AND d = 1;
|
||||||
|
#id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
#1 SIMPLE t1 ref c,bd bd 10 const,const 2 Using where
|
||||||
|
#CREATE TABLE t2 ( a INT )
|
||||||
|
#SELECT a
|
||||||
|
#FROM t1
|
||||||
|
#WHERE c = 1 AND b = 1 AND d = 1;
|
||||||
|
#SELECT * FROM t2;
|
||||||
|
#a
|
||||||
|
#2
|
||||||
|
#3
|
||||||
|
#DROP TABLE t1, t2;
|
||||||
|
#CREATE TABLE t1( a INT, b INT, KEY(a), KEY(b) );
|
||||||
|
#INSERT INTO t1 VALUES (1, 2), (1, 2), (1, 2), (1, 2);
|
||||||
|
#SELECT * FROM t1 FORCE INDEX(a, b) WHERE a = 1 AND b = 2;
|
||||||
|
#a b
|
||||||
|
#1 2
|
||||||
|
#1 2
|
||||||
|
#1 2
|
||||||
|
#1 2
|
||||||
|
#DROP TABLE t1;
|
||||||
|
## Code coverage of fix.
|
||||||
|
#CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT);
|
||||||
|
#INSERT INTO t1 (b) VALUES (1);
|
||||||
|
#UPDATE t1 SET b = 2 WHERE a = 1;
|
||||||
|
#SELECT * FROM t1;
|
||||||
|
#a b
|
||||||
|
#1 2
|
||||||
|
#CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(1) );
|
||||||
|
#INSERT INTO t2 (b) VALUES ('a');
|
||||||
|
#UPDATE t2 SET b = 'b' WHERE a = 1;
|
||||||
|
#SELECT * FROM t2;
|
||||||
|
#a b
|
||||||
|
#1 b
|
||||||
|
#DROP TABLE t1, t2;
|
||||||
|
|
|
@ -162,7 +162,7 @@ our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
|
||||||
|
|
||||||
# If you add a new suite, please check TEST_DIRS in Makefile.am.
|
# If you add a new suite, please check TEST_DIRS in Makefile.am.
|
||||||
#
|
#
|
||||||
my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,rpl_ndb,ndb,innodb,perfschema";
|
my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,innodb,perfschema";
|
||||||
my $opt_suites;
|
my $opt_suites;
|
||||||
|
|
||||||
our $opt_verbose= 0; # Verbose output, enable with --verbose
|
our $opt_verbose= 0; # Verbose output, enable with --verbose
|
||||||
|
|
|
@ -220,3 +220,14 @@ Variable_name Value
|
||||||
Qcache_hits 1
|
Qcache_hits 1
|
||||||
set GLOBAL query_cache_size=1048576;
|
set GLOBAL query_cache_size=1048576;
|
||||||
drop table t2;
|
drop table t2;
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1 VALUES(1);
|
||||||
|
ROLLBACK WORK AND CHAIN NO RELEASE;
|
||||||
|
SELECT a FROM t1;
|
||||||
|
a
|
||||||
|
ROLLBACK WORK AND CHAIN NO RELEASE;
|
||||||
|
SELECT a FROM t1;
|
||||||
|
a
|
||||||
|
ROLLBACK;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
|
@ -3853,6 +3853,9 @@ GROUP_CONCAT(IFNULL(a,''))
|
||||||
SELECT GROUP_CONCAT(IF(a,a,'')) FROM t1;
|
SELECT GROUP_CONCAT(IF(a,a,'')) FROM t1;
|
||||||
GROUP_CONCAT(IF(a,a,''))
|
GROUP_CONCAT(IF(a,a,''))
|
||||||
1234567
|
1234567
|
||||||
|
SELECT GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END) FROM t1;
|
||||||
|
GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END)
|
||||||
|
1234567
|
||||||
SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
|
SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
|
||||||
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 COALESCE(a,'') 253 9 7 Y 0 31 8
|
def COALESCE(a,'') 253 9 7 Y 0 31 8
|
||||||
|
|
|
@ -509,3 +509,18 @@ CREATE TABLE t3 LIKE t1;
|
||||||
DELETE FROM t1.*, test.t2.*, a.* USING t1, t2, t3 AS a;
|
DELETE FROM t1.*, test.t2.*, a.* USING t1, t2, t3 AS a;
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
#
|
||||||
|
# Bug#51099 Assertion in mysql_multi_delete_prepare()
|
||||||
|
#
|
||||||
|
DROP TABLE IF EXISTS t1, t2;
|
||||||
|
DROP VIEW IF EXISTS v1, v2;
|
||||||
|
CREATE TABLE t1(a INT);
|
||||||
|
CREATE TABLE t2(b INT);
|
||||||
|
CREATE VIEW v1 AS SELECT a, b FROM t1, t2;
|
||||||
|
CREATE VIEW v2 AS SELECT a FROM v1;
|
||||||
|
DELETE FROM v2;
|
||||||
|
ERROR HY000: Can not delete from join view 'test.v2'
|
||||||
|
DELETE v2 FROM v2;
|
||||||
|
ERROR HY000: Can not delete from join view 'test.v2'
|
||||||
|
DROP VIEW v2, v1;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
|
@ -600,3 +600,10 @@ NULL
|
||||||
SELECT -9223372036854775808 MOD -1;
|
SELECT -9223372036854775808 MOD -1;
|
||||||
-9223372036854775808 MOD -1
|
-9223372036854775808 MOD -1
|
||||||
0
|
0
|
||||||
|
#
|
||||||
|
# Bug #57209 valgrind + Assertion failed: dst > buf
|
||||||
|
#
|
||||||
|
SELECT floor(log10(format(concat_ws(5445796E25, 5306463, 30837), -358821)))
|
||||||
|
as foo;
|
||||||
|
foo
|
||||||
|
2
|
||||||
|
|
|
@ -1316,3 +1316,14 @@ SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a);
|
||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
#
|
||||||
|
# Bug#57039: constant subtime expression returns incorrect result.
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (`date_date` datetime NOT NULL);
|
||||||
|
INSERT INTO t1 VALUES ('2008-01-03 00:00:00'), ('2008-01-03 00:00:00');
|
||||||
|
SELECT * FROM t1 WHERE date_date >= subtime(now(), "00:30:00");
|
||||||
|
date_date
|
||||||
|
SELECT * FROM t1 WHERE date_date <= addtime(date_add("2000-1-1", INTERVAL "1:1:1" HOUR_SECOND), "00:20:00");
|
||||||
|
date_date
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
|
|
@ -1156,6 +1156,61 @@ key1 key2 key3
|
||||||
38 38 38
|
38 38 38
|
||||||
39 39 39
|
39 39 39
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# Bug#56423: Different count with SELECT and CREATE SELECT queries
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
a INT,
|
||||||
|
b INT,
|
||||||
|
c INT,
|
||||||
|
d INT,
|
||||||
|
PRIMARY KEY (a),
|
||||||
|
KEY (c),
|
||||||
|
KEY bd (b,d)
|
||||||
|
);
|
||||||
|
INSERT INTO t1 VALUES
|
||||||
|
(1, 0, 1, 0),
|
||||||
|
(2, 1, 1, 1),
|
||||||
|
(3, 1, 1, 1),
|
||||||
|
(4, 0, 1, 1);
|
||||||
|
EXPLAIN
|
||||||
|
SELECT a
|
||||||
|
FROM t1
|
||||||
|
WHERE c = 1 AND b = 1 AND d = 1;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 ref c,bd bd 10 const,const 2 Using where
|
||||||
|
CREATE TABLE t2 ( a INT )
|
||||||
|
SELECT a
|
||||||
|
FROM t1
|
||||||
|
WHERE c = 1 AND b = 1 AND d = 1;
|
||||||
|
SELECT * FROM t2;
|
||||||
|
a
|
||||||
|
2
|
||||||
|
3
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
CREATE TABLE t1( a INT, b INT, KEY(a), KEY(b) );
|
||||||
|
INSERT INTO t1 VALUES (1, 2), (1, 2), (1, 2), (1, 2);
|
||||||
|
SELECT * FROM t1 FORCE INDEX(a, b) WHERE a = 1 AND b = 2;
|
||||||
|
a b
|
||||||
|
1 2
|
||||||
|
1 2
|
||||||
|
1 2
|
||||||
|
1 2
|
||||||
|
DROP TABLE t1;
|
||||||
|
# Code coverage of fix.
|
||||||
|
CREATE TABLE t1 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT);
|
||||||
|
INSERT INTO t1 (b) VALUES (1);
|
||||||
|
UPDATE t1 SET b = 2 WHERE a = 1;
|
||||||
|
SELECT * FROM t1;
|
||||||
|
a b
|
||||||
|
1 2
|
||||||
|
CREATE TABLE t2 ( a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(1) );
|
||||||
|
INSERT INTO t2 (b) VALUES ('a');
|
||||||
|
UPDATE t2 SET b = 'b' WHERE a = 1;
|
||||||
|
SELECT * FROM t2;
|
||||||
|
a b
|
||||||
|
1 b
|
||||||
|
DROP TABLE t1, t2;
|
||||||
#---------------- 2-sweeps read Index merge test 2 -------------------------------
|
#---------------- 2-sweeps read Index merge test 2 -------------------------------
|
||||||
SET SESSION STORAGE_ENGINE = MyISAM;
|
SET SESSION STORAGE_ENGINE = MyISAM;
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
|
|
|
@ -2632,7 +2632,8 @@ DROP TABLE IF EXISTS t1;
|
||||||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
INSERT INTO t1 VALUES (1),(2),(3);
|
INSERT INTO t1 VALUES (1),(2),(3);
|
||||||
# Connection: con1
|
# Connection: con1
|
||||||
SET debug_sync='lock_table_for_truncate SIGNAL parked_truncate WAIT_FOR go_truncate';
|
LOCK TABLES t1 WRITE;
|
||||||
|
SET debug_sync='upgrade_lock_for_truncate SIGNAL parked_truncate WAIT_FOR go_truncate';
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
# Connection: default
|
# Connection: default
|
||||||
SET debug_sync='now WAIT_FOR parked_truncate';
|
SET debug_sync='now WAIT_FOR parked_truncate';
|
||||||
|
@ -2647,10 +2648,11 @@ FLUSH TABLES t1;
|
||||||
# Connection: default
|
# Connection: default
|
||||||
SET debug_sync='now WAIT_FOR parked_flush';
|
SET debug_sync='now WAIT_FOR parked_flush';
|
||||||
SET debug_sync='now SIGNAL go_truncate';
|
SET debug_sync='now SIGNAL go_truncate';
|
||||||
# Connection: con1
|
# Ensure that truncate waits for a exclusive lock
|
||||||
# Reaping...
|
|
||||||
# Connection: default
|
|
||||||
SET debug_sync= 'now SIGNAL go_show';
|
SET debug_sync= 'now SIGNAL go_show';
|
||||||
|
# Connection: con1 (TRUNCATE)
|
||||||
|
# Reaping...
|
||||||
|
UNLOCK TABLES;
|
||||||
# Connection: con2 (SHOW FIELDS FROM t1)
|
# Connection: con2 (SHOW FIELDS FROM t1)
|
||||||
# Reaping...
|
# Reaping...
|
||||||
Field Type Null Key Default Extra
|
Field Type Null Key Default Extra
|
||||||
|
|
|
@ -3486,12 +3486,13 @@ ALTER TABLE m1 ADD INDEX (c1);
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
DROP TABLE m1, t1;
|
DROP TABLE m1, t1;
|
||||||
#
|
#
|
||||||
# Locking the merge table will implicitly lock children.
|
# Locking the merge table won't implicitly lock children.
|
||||||
#
|
#
|
||||||
CREATE TABLE t1 (c1 INT);
|
CREATE TABLE t1 (c1 INT);
|
||||||
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1);
|
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1);
|
||||||
LOCK TABLE m1 WRITE;
|
LOCK TABLE m1 WRITE;
|
||||||
ALTER TABLE t1 ADD INDEX (c1);
|
ALTER TABLE t1 ADD INDEX (c1);
|
||||||
|
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||||
LOCK TABLE m1 WRITE, t1 WRITE;
|
LOCK TABLE m1 WRITE, t1 WRITE;
|
||||||
ALTER TABLE t1 ADD INDEX (c1);
|
ALTER TABLE t1 ADD INDEX (c1);
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
@ -3661,4 +3662,16 @@ REPAIR TABLE t2 USE_FRM;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t2 repair note The storage engine for the table doesn't support repair
|
test.t2 repair note The storage engine for the table doesn't support repair
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
#
|
||||||
|
# Bug#57002 Assert in upgrade_shared_lock_to_exclusive()
|
||||||
|
# for ALTER TABLE + MERGE tables
|
||||||
|
#
|
||||||
|
DROP TABLE IF EXISTS t1, m1;
|
||||||
|
CREATE TABLE t1(a INT) engine=myisam;
|
||||||
|
CREATE TABLE m1(a INT) engine=merge UNION(t1);
|
||||||
|
LOCK TABLES t1 READ, m1 WRITE;
|
||||||
|
ALTER TABLE t1 engine=myisam;
|
||||||
|
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE m1, t1;
|
||||||
End of 6.0 tests
|
End of 6.0 tests
|
||||||
|
|
|
@ -8,7 +8,7 @@ mysql.db OK
|
||||||
mysql.event OK
|
mysql.event OK
|
||||||
mysql.func OK
|
mysql.func OK
|
||||||
mysql.general_log
|
mysql.general_log
|
||||||
note : The storage engine for the table doesn't support optimize
|
note : The storage engine for the table doesn't support analyze
|
||||||
mysql.help_category OK
|
mysql.help_category OK
|
||||||
mysql.help_keyword OK
|
mysql.help_keyword OK
|
||||||
mysql.help_relation OK
|
mysql.help_relation OK
|
||||||
|
@ -21,7 +21,7 @@ mysql.procs_priv OK
|
||||||
mysql.proxy_priv OK
|
mysql.proxy_priv OK
|
||||||
mysql.servers OK
|
mysql.servers OK
|
||||||
mysql.slow_log
|
mysql.slow_log
|
||||||
note : The storage engine for the table doesn't support optimize
|
note : The storage engine for the table doesn't support analyze
|
||||||
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
|
||||||
|
@ -29,6 +29,8 @@ 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
|
||||||
|
mtr.global_suppressions Table is already up to date
|
||||||
|
mtr.test_suppressions Table is already up to date
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
mysql.db OK
|
mysql.db OK
|
||||||
mysql.event OK
|
mysql.event OK
|
||||||
|
@ -55,10 +57,64 @@ 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
|
||||||
|
mysql.columns_priv OK
|
||||||
|
mysql.db OK
|
||||||
|
mysql.event OK
|
||||||
|
mysql.func OK
|
||||||
|
mysql.general_log
|
||||||
|
note : The storage engine for the table doesn't support analyze
|
||||||
|
mysql.help_category OK
|
||||||
|
mysql.help_keyword OK
|
||||||
|
mysql.help_relation OK
|
||||||
|
mysql.help_topic OK
|
||||||
|
mysql.host OK
|
||||||
|
mysql.ndb_binlog_index OK
|
||||||
|
mysql.plugin OK
|
||||||
|
mysql.proc OK
|
||||||
|
mysql.procs_priv OK
|
||||||
|
mysql.proxy_priv OK
|
||||||
|
mysql.servers OK
|
||||||
|
mysql.slow_log
|
||||||
|
note : The storage engine for the table doesn't support analyze
|
||||||
|
mysql.tables_priv OK
|
||||||
|
mysql.time_zone OK
|
||||||
|
mysql.time_zone_leap_second OK
|
||||||
|
mysql.time_zone_name OK
|
||||||
|
mysql.time_zone_transition OK
|
||||||
|
mysql.time_zone_transition_type OK
|
||||||
|
mysql.user OK
|
||||||
|
mysql.columns_priv Table is already up to date
|
||||||
|
mysql.db Table is already up to date
|
||||||
|
mysql.event Table is already up to date
|
||||||
|
mysql.func Table is already up to date
|
||||||
|
mysql.general_log
|
||||||
|
note : The storage engine for the table doesn't support optimize
|
||||||
|
mysql.help_category Table is already up to date
|
||||||
|
mysql.help_keyword Table is already up to date
|
||||||
|
mysql.help_relation Table is already up to date
|
||||||
|
mysql.help_topic Table is already up to date
|
||||||
|
mysql.host Table is already up to date
|
||||||
|
mysql.ndb_binlog_index Table is already up to date
|
||||||
|
mysql.plugin Table is already up to date
|
||||||
|
mysql.proc Table is already up to date
|
||||||
|
mysql.procs_priv Table is already up to date
|
||||||
|
mysql.proxy_priv Table is already up to date
|
||||||
|
mysql.servers Table is already up to date
|
||||||
|
mysql.slow_log
|
||||||
|
note : The storage engine for the table doesn't support optimize
|
||||||
|
mysql.tables_priv Table is already up to date
|
||||||
|
mysql.time_zone Table is already up to date
|
||||||
|
mysql.time_zone_leap_second Table is already up to date
|
||||||
|
mysql.time_zone_name Table is already up to date
|
||||||
|
mysql.time_zone_transition Table is already up to date
|
||||||
|
mysql.time_zone_transition_type Table is already up to date
|
||||||
|
mysql.user Table is already up to date
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
create view v1 as select * from t1;
|
create view v1 as select * from t1;
|
||||||
test.t1 OK
|
test.t1 OK
|
||||||
|
test.t1 Table is already up to date
|
||||||
test.t1 OK
|
test.t1 OK
|
||||||
|
test.t1 Table is already up to date
|
||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table `t``1`(a int);
|
create table `t``1`(a int);
|
||||||
|
@ -127,6 +183,7 @@ Tables_in_test
|
||||||
t1
|
t1
|
||||||
#mysql50#v-1
|
#mysql50#v-1
|
||||||
v1
|
v1
|
||||||
|
test.t1 OK
|
||||||
show tables;
|
show tables;
|
||||||
Tables_in_test
|
Tables_in_test
|
||||||
t1
|
t1
|
||||||
|
@ -200,3 +257,6 @@ Tables_in_test (t1-1)
|
||||||
t1-1
|
t1-1
|
||||||
drop table `t1-1`;
|
drop table `t1-1`;
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
#
|
||||||
|
# Bug #35269: mysqlcheck behaves different depending on order of parameters
|
||||||
|
#
|
||||||
|
|
7
mysql-test/r/plugin_load_option.result
Normal file
7
mysql-test/r/plugin_load_option.result
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
UNINSTALL PLUGIN example;
|
||||||
|
ERROR HY000: Plugin 'example' is force_plus_permanent and can not be unloaded
|
||||||
|
SELECT PLUGIN_NAME, PLUGIN_STATUS, LOAD_OPTION FROM INFORMATION_SCHEMA.PLUGINS
|
||||||
|
WHERE PLUGIN_NAME IN ('MyISAM', 'EXAMPLE');
|
||||||
|
PLUGIN_NAME PLUGIN_STATUS LOAD_OPTION
|
||||||
|
MyISAM ACTIVE FORCE
|
||||||
|
EXAMPLE ACTIVE FORCE_PLUS_PERMANENT
|
|
@ -5,20 +5,24 @@ drop table if exists t1;
|
||||||
create table t1 (a varchar(100));
|
create table t1 (a varchar(100));
|
||||||
insert into t1 values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
|
insert into t1 values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
|
||||||
Activate debug hook and attempt to retrieve the statement from the cache.
|
Activate debug hook and attempt to retrieve the statement from the cache.
|
||||||
set session debug='+d,wait_in_query_cache_insert';
|
set debug_sync="wait_in_query_cache_insert SIGNAL parked WAIT_FOR go";
|
||||||
select SQL_CACHE * from t1;;
|
select SQL_CACHE * from t1;;
|
||||||
|
set debug_sync="now WAIT_FOR parked";
|
||||||
On a second connection; clear the query cache.
|
On a second connection; clear the query cache.
|
||||||
show status like 'Qcache_queries_in_cache';
|
show status like 'Qcache_queries_in_cache';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 1
|
Qcache_queries_in_cache 1
|
||||||
set global query_cache_size= 0;
|
set global query_cache_size= 0;
|
||||||
Signal the debug hook to release the lock.
|
Signal the debug hook to release the lock.
|
||||||
select id from information_schema.processlist where state='wait_in_query_cache_insert' into @thread_id;
|
set debug_sync="now SIGNAL go";
|
||||||
kill query @thread_id;
|
|
||||||
Show query cache status.
|
Show query cache status.
|
||||||
show status like 'Qcache_queries_in_cache';
|
show status like 'Qcache_queries_in_cache';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Qcache_queries_in_cache 0
|
Qcache_queries_in_cache 0
|
||||||
|
a
|
||||||
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||||
|
set debug_sync= 'RESET';
|
||||||
set global query_cache_size= 0;
|
set global query_cache_size= 0;
|
||||||
use test;
|
use test;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -32,11 +36,12 @@ SET GLOBAL concurrent_insert= 1;
|
||||||
SET GLOBAL query_cache_size= 1024*512;
|
SET GLOBAL query_cache_size= 1024*512;
|
||||||
SET GLOBAL query_cache_type= ON;
|
SET GLOBAL query_cache_type= ON;
|
||||||
# Switch to connection con1
|
# Switch to connection con1
|
||||||
SET SESSION debug='+d,wait_after_query_cache_invalidate';
|
SET DEBUG_SYNC = "wait_after_query_cache_invalidate SIGNAL parked WAIT_FOR go";
|
||||||
# Send concurrent insert, will wait in the query cache table invalidate
|
# Send concurrent insert, will wait in the query cache table invalidate
|
||||||
INSERT INTO t1 VALUES (4);
|
INSERT INTO t1 VALUES (4);
|
||||||
# Switch to connection default
|
# Switch to connection default
|
||||||
# Wait for concurrent insert to reach the debug point
|
# Wait for concurrent insert to reach the debug point
|
||||||
|
SET DEBUG_SYNC = "now WAIT_FOR parked";
|
||||||
# Switch to connection con2
|
# Switch to connection con2
|
||||||
# Send SELECT that shouldn't be cached
|
# Send SELECT that shouldn't be cached
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
|
@ -46,9 +51,7 @@ a
|
||||||
3
|
3
|
||||||
# Switch to connection default
|
# Switch to connection default
|
||||||
# Notify the concurrent insert to proceed
|
# Notify the concurrent insert to proceed
|
||||||
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
|
SET DEBUG_SYNC = "now SIGNAL go";
|
||||||
WHERE STATE = 'wait_after_query_cache_invalidate' INTO @thread_id;
|
|
||||||
KILL QUERY @thread_id;
|
|
||||||
# Switch to connection con1
|
# Switch to connection con1
|
||||||
# Gather insert result
|
# Gather insert result
|
||||||
SHOW STATUS LIKE "Qcache_queries_in_cache";
|
SHOW STATUS LIKE "Qcache_queries_in_cache";
|
||||||
|
@ -66,6 +69,7 @@ Variable_name Value
|
||||||
Qcache_queries_in_cache 1
|
Qcache_queries_in_cache 1
|
||||||
# Disconnect
|
# Disconnect
|
||||||
# Restore defaults
|
# Restore defaults
|
||||||
|
SET DEBUG_SYNC= 'RESET';
|
||||||
RESET QUERY CACHE;
|
RESET QUERY CACHE;
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
SET GLOBAL concurrent_insert= DEFAULT;
|
SET GLOBAL concurrent_insert= DEFAULT;
|
||||||
|
@ -108,43 +112,48 @@ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||||
** before the mutex lock in invalidate_table_internal.
|
** before the mutex lock in invalidate_table_internal.
|
||||||
** This will allow new result sets to be written into the QC.
|
** This will allow new result sets to be written into the QC.
|
||||||
**
|
**
|
||||||
SET SESSION debug='+d,wait_in_query_cache_invalidate1';
|
SET DEBUG_SYNC="wait_in_query_cache_invalidate1 SIGNAL parked1_1 WAIT_FOR go1_1";
|
||||||
SET SESSION debug='+d,wait_in_query_cache_invalidate2';
|
SET DEBUG_SYNC="wait_in_query_cache_invalidate2 SIGNAL parked1_2 WAIT_FOR go1_2";
|
||||||
DELETE FROM t1 WHERE a like '%a%';;
|
DELETE FROM t1 WHERE a like '%a%';;
|
||||||
=================================== Connection default
|
=================================== Connection default
|
||||||
** Assert that the expect process status is obtained.
|
** Assert that the expect process status is obtained.
|
||||||
|
SET DEBUG_SYNC="now WAIT_FOR parked1_1";
|
||||||
**
|
**
|
||||||
=================================== Connection thd2
|
=================================== Connection thd2
|
||||||
** On THD2: Insert a result into the cache. This attempt will be blocked
|
** On THD2: Insert a result into the cache. This attempt will be blocked
|
||||||
** because of a debug hook placed just before the mutex lock after which
|
** because of a debug hook placed just before the mutex lock after which
|
||||||
** the first part of the result set is written.
|
** the first part of the result set is written.
|
||||||
SET SESSION debug='+d,wait_in_query_cache_insert';
|
SET DEBUG_SYNC="wait_in_query_cache_insert SIGNAL parked2 WAIT_FOR go2 EXECUTE 1";
|
||||||
SELECT SQL_CACHE * FROM t2 UNION SELECT * FROM t3;
|
SELECT SQL_CACHE * FROM t2 UNION SELECT * FROM t3;
|
||||||
|
=================================== Connection default
|
||||||
|
** Assert that the SELECT-stmt thread reaches the sync point.
|
||||||
|
SET DEBUG_SYNC="now WAIT_FOR parked2";
|
||||||
|
**
|
||||||
|
**
|
||||||
=================================== Connection thd3
|
=================================== Connection thd3
|
||||||
** On THD3: Insert another result into the cache and block on the same
|
** On THD3: Insert another result into the cache and block on the same
|
||||||
** debug hook.
|
** debug hook.
|
||||||
SET SESSION debug='+d,wait_in_query_cache_insert';
|
SET DEBUG_SYNC="wait_in_query_cache_insert SIGNAL parked3 WAIT_FOR go3 EXECUTE 1";
|
||||||
SELECT SQL_CACHE * FROM t4 UNION SELECT * FROM t5;;
|
SELECT SQL_CACHE * FROM t4 UNION SELECT * FROM t5;
|
||||||
=================================== Connection default
|
=================================== Connection default
|
||||||
** Assert that the two SELECT-stmt threads to reach the hook.
|
** Assert that the SELECT-stmt thread reaches the sync point.
|
||||||
|
SET DEBUG_SYNC="now WAIT_FOR parked3";
|
||||||
**
|
**
|
||||||
**
|
**
|
||||||
** Signal the DELETE thread, THD1, to continue. It will enter the mutex
|
** Signal the DELETE thread, THD1, to continue. It will enter the mutex
|
||||||
** lock and set query cache status to TABLE_FLUSH_IN_PROGRESS and then
|
** lock and set query cache status to TABLE_FLUSH_IN_PROGRESS and then
|
||||||
** unlock the mutex before stopping on the next debug hook.
|
** unlock the mutex before stopping on the next debug hook.
|
||||||
SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_invalidate1' LIMIT 1 INTO @flush_thread_id;
|
SET DEBUG_SYNC="now SIGNAL go1_1";
|
||||||
KILL QUERY @flush_thread_id;
|
|
||||||
** Assert that we reach the next debug hook.
|
** Assert that we reach the next debug hook.
|
||||||
|
SET DEBUG_SYNC="now WAIT_FOR parked1_2";
|
||||||
**
|
**
|
||||||
** Signal the remaining debug hooks blocking THD2 and THD3.
|
** Signal the remaining debug hooks blocking THD2 and THD3.
|
||||||
** The threads will grab the guard mutex enter the wait condition and
|
** The threads will grab the guard mutex enter the wait condition and
|
||||||
** and finally release the mutex. The threads will continue to wait
|
** and finally release the mutex. The threads will continue to wait
|
||||||
** until a broadcast signal reaches them causing both threads to
|
** until a broadcast signal reaches them causing both threads to
|
||||||
** come alive and check the condition.
|
** come alive and check the condition.
|
||||||
SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_insert' ORDER BY id ASC LIMIT 1 INTO @thread_id;
|
SET DEBUG_SYNC="now SIGNAL go2";
|
||||||
KILL QUERY @thread_id;
|
SET DEBUG_SYNC="now SIGNAL go3";
|
||||||
SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_insert' ORDER BY id DESC LIMIT 1 INTO @thread_id;
|
|
||||||
KILL QUERY @thread_id;
|
|
||||||
**
|
**
|
||||||
** Finally signal the DELETE statement on THD1 one last time.
|
** Finally signal the DELETE statement on THD1 one last time.
|
||||||
** The stmt will complete the query cache invalidation and return
|
** The stmt will complete the query cache invalidation and return
|
||||||
|
@ -152,8 +161,7 @@ KILL QUERY @thread_id;
|
||||||
** One signal will be sent to the thread group waiting for executing
|
** One signal will be sent to the thread group waiting for executing
|
||||||
** invalidations and a broadcast signal will be sent to the thread
|
** invalidations and a broadcast signal will be sent to the thread
|
||||||
** group holding result set writers.
|
** group holding result set writers.
|
||||||
SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_invalidate2' LIMIT 1 INTO @flush_thread_id;
|
SET DEBUG_SYNC="now SIGNAL go1_2";
|
||||||
KILL QUERY @flush_thread_id;
|
|
||||||
**
|
**
|
||||||
*************************************************************************
|
*************************************************************************
|
||||||
** No tables should be locked
|
** No tables should be locked
|
||||||
|
@ -172,6 +180,7 @@ DELETE FROM t4;
|
||||||
DELETE FROM t5;
|
DELETE FROM t5;
|
||||||
=================================== Connection thd1
|
=================================== Connection thd1
|
||||||
** Done.
|
** Done.
|
||||||
|
SET DEBUG_SYNC= 'RESET';
|
||||||
SET GLOBAL query_cache_size= 0;
|
SET GLOBAL query_cache_size= 0;
|
||||||
# Restore defaults
|
# Restore defaults
|
||||||
RESET QUERY CACHE;
|
RESET QUERY CACHE;
|
||||||
|
@ -179,3 +188,35 @@ FLUSH STATUS;
|
||||||
DROP TABLE t1,t2,t3,t4,t5;
|
DROP TABLE t1,t2,t3,t4,t5;
|
||||||
SET GLOBAL query_cache_size= DEFAULT;
|
SET GLOBAL query_cache_size= DEFAULT;
|
||||||
SET GLOBAL query_cache_type= DEFAULT;
|
SET GLOBAL query_cache_type= DEFAULT;
|
||||||
|
#
|
||||||
|
# Bug#56822: Add a thread state for sessions waiting on the query cache lock
|
||||||
|
#
|
||||||
|
SET @old_query_cache_size= @@GLOBAL.query_cache_size;
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
CREATE TABLE t1 (a INT);
|
||||||
|
INSERT INTO t1 VALUES (1),(2),(3);
|
||||||
|
SET GLOBAL concurrent_insert= 1;
|
||||||
|
SET GLOBAL query_cache_size= 1024*512;
|
||||||
|
SET GLOBAL query_cache_type= ON;
|
||||||
|
# Switch to connection con1
|
||||||
|
SET DEBUG_SYNC = "wait_in_query_cache_invalidate2 SIGNAL parked WAIT_FOR go";
|
||||||
|
# Send INSERT, will wait in the query cache table invalidation
|
||||||
|
INSERT INTO t1 VALUES (4);;
|
||||||
|
# Switch to connection default
|
||||||
|
# Wait for insert to reach the debug point
|
||||||
|
SET DEBUG_SYNC = "now WAIT_FOR parked";
|
||||||
|
# Switch to connection con2
|
||||||
|
# Send a query that should wait on the query cache lock
|
||||||
|
RESET QUERY CACHE;
|
||||||
|
# Switch to connection default
|
||||||
|
# Wait for the state to be reflected in the processlist
|
||||||
|
# Signal that the query cache can be unlocked
|
||||||
|
SET DEBUG_SYNC="now SIGNAL go";
|
||||||
|
# Reap con1 and disconnect
|
||||||
|
# Reap con2 and disconnect
|
||||||
|
# Restore defaults
|
||||||
|
SET DEBUG_SYNC= 'RESET';
|
||||||
|
RESET QUERY CACHE;
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET GLOBAL query_cache_size= DEFAULT;
|
||||||
|
SET GLOBAL query_cache_type= DEFAULT;
|
||||||
|
|
|
@ -585,3 +585,20 @@ UPDATE t1_aux SET f2 = 2 WHERE f1 = f1_two_inserts()|
|
||||||
ERROR 23000: Column 'f2' cannot be null
|
ERROR 23000: Column 'f2' cannot be null
|
||||||
DROP TABLE t1_aux, t1_not_null|
|
DROP TABLE t1_aux, t1_not_null|
|
||||||
DROP FUNCTION f1_two_inserts|
|
DROP FUNCTION f1_two_inserts|
|
||||||
|
#
|
||||||
|
# Bug#49938: Failing assertion: inode or deadlock in fsp/fsp0fsp.c
|
||||||
|
#
|
||||||
|
DROP PROCEDURE IF EXISTS p1|
|
||||||
|
DROP TABLE IF EXISTS t1|
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=INNODB|
|
||||||
|
CREATE PROCEDURE p1()
|
||||||
|
BEGIN
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
END|
|
||||||
|
LOCK TABLES t1 WRITE|
|
||||||
|
CALL p1()|
|
||||||
|
FLUSH TABLES;
|
||||||
|
UNLOCK TABLES|
|
||||||
|
CALL p1()|
|
||||||
|
DROP PROCEDURE p1|
|
||||||
|
DROP TABLE t1|
|
||||||
|
|
|
@ -151,9 +151,14 @@ CREATE TRIGGER t1_ad AFTER DELETE ON t1 FOR EACH ROW SET @b = 1;
|
||||||
SET @a = 0;
|
SET @a = 0;
|
||||||
SET @b = 0;
|
SET @b = 0;
|
||||||
TRUNCATE t1;
|
TRUNCATE t1;
|
||||||
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`b`) REFERENCES `test`.`t1` (`a`))
|
||||||
SELECT @a, @b;
|
SELECT @a, @b;
|
||||||
@a @b
|
@a @b
|
||||||
0 0
|
0 0
|
||||||
|
DELETE FROM t1;
|
||||||
|
SELECT @a, @b;
|
||||||
|
@a @b
|
||||||
|
1 1
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
DELETE FROM t1;
|
DELETE FROM t1;
|
||||||
SELECT @a, @b;
|
SELECT @a, @b;
|
||||||
|
|
|
@ -680,5 +680,17 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t2 const PRIMARY PRIMARY 8 const 1 Using index
|
1 SIMPLE t2 const PRIMARY PRIMARY 8 const 1 Using index
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
#
|
#
|
||||||
|
# Bug#57095: Wrongly chosen expression cache type led to a wrong
|
||||||
|
# result.
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (`b` datetime );
|
||||||
|
INSERT INTO t1 VALUES ('2010-01-01 00:00:00'), ('2010-01-01 00:00:00');
|
||||||
|
SELECT * FROM t1 WHERE b <= coalesce(NULL, now());
|
||||||
|
b
|
||||||
|
2010-01-01 00:00:00
|
||||||
|
2010-01-01 00:00:00
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
#
|
||||||
# End of 5.5 tests
|
# End of 5.5 tests
|
||||||
#
|
#
|
||||||
|
|
|
@ -165,6 +165,7 @@ def information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8
|
||||||
def information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
def information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 20 0 NULL NULL bigint(21) unsigned select
|
||||||
def information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
def information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
||||||
def information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
|
def information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select
|
||||||
|
def information_schema PLUGINS LOAD_OPTION 11 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
||||||
def information_schema PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
def information_schema PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
||||||
def information_schema PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
|
def information_schema PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select
|
||||||
def information_schema PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
def information_schema PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select
|
||||||
|
@ -562,6 +563,7 @@ NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21
|
||||||
3.0000 information_schema PLUGINS PLUGIN_AUTHOR varchar 64 192 utf8 utf8_general_ci varchar(64)
|
3.0000 information_schema PLUGINS PLUGIN_AUTHOR varchar 64 192 utf8 utf8_general_ci varchar(64)
|
||||||
1.0000 information_schema PLUGINS PLUGIN_DESCRIPTION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
|
1.0000 information_schema PLUGINS PLUGIN_DESCRIPTION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext
|
||||||
3.0000 information_schema PLUGINS PLUGIN_LICENSE varchar 80 240 utf8 utf8_general_ci varchar(80)
|
3.0000 information_schema PLUGINS PLUGIN_LICENSE varchar 80 240 utf8 utf8_general_ci varchar(80)
|
||||||
|
3.0000 information_schema PLUGINS LOAD_OPTION varchar 64 192 utf8 utf8_general_ci varchar(64)
|
||||||
NULL information_schema PROCESSLIST ID bigint NULL NULL NULL NULL bigint(4)
|
NULL information_schema PROCESSLIST ID bigint NULL NULL NULL NULL bigint(4)
|
||||||
3.0000 information_schema PROCESSLIST USER varchar 16 48 utf8 utf8_general_ci varchar(16)
|
3.0000 information_schema PROCESSLIST USER varchar 16 48 utf8 utf8_general_ci varchar(16)
|
||||||
3.0000 information_schema PROCESSLIST HOST varchar 64 192 utf8 utf8_general_ci varchar(64)
|
3.0000 information_schema PROCESSLIST HOST varchar 64 192 utf8 utf8_general_ci varchar(64)
|
||||||
|
|
|
@ -918,9 +918,9 @@ ERROR HY000: Too big row
|
||||||
alter table t1 row_format=compact;
|
alter table t1 row_format=compact;
|
||||||
create index t1u on t1 (u(1));
|
create index t1u on t1 (u(1));
|
||||||
drop table t1;
|
drop table t1;
|
||||||
set global innodb_file_per_table=1;
|
set global innodb_file_per_table=0;
|
||||||
set global innodb_file_format=Barracuda;
|
set global innodb_file_format=Antelope;
|
||||||
set global innodb_file_format_max=Barracuda;
|
set global innodb_file_format_max=Antelope;
|
||||||
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
|
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
|
||||||
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
|
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
|
||||||
CREATE TABLE t1(
|
CREATE TABLE t1(
|
||||||
|
|
68
mysql-test/suite/innodb/r/innodb-truncate.result
Normal file
68
mysql-test/suite/innodb/r/innodb-truncate.result
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
#
|
||||||
|
# TRUNCATE TABLE
|
||||||
|
#
|
||||||
|
# Truncating is disallowed for parent tables unless such table
|
||||||
|
# participates in self-referencing foreign keys only.
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB;
|
||||||
|
CREATE TABLE t2 (fk INT NOT NULL, FOREIGN KEY (fk) REFERENCES t1 (pk)) ENGINE=INNODB;
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`fk`) REFERENCES `test`.`t1` (`pk`))
|
||||||
|
# Truncation of child should succeed.
|
||||||
|
TRUNCATE TABLE t2;
|
||||||
|
DROP TABLE t2;
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY, fk INT,
|
||||||
|
FOREIGN KEY (fk) REFERENCES t1 (pk)) ENGINE=INNODB;
|
||||||
|
# Truncation of self-referencing table should succeed.
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# Also, truncating such tables is allowed if foreign key
|
||||||
|
# checks are disabled.
|
||||||
|
#
|
||||||
|
SET @old_foreign_key_checks = @@SESSION.foreign_key_checks;
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB;
|
||||||
|
CREATE TABLE t2 (fk INT NOT NULL, FOREIGN KEY (fk) REFERENCES t1 (pk)) ENGINE=INNODB;
|
||||||
|
CREATE TABLE t3 (pk INT PRIMARY KEY, fk INT,
|
||||||
|
FOREIGN KEY (fk) REFERENCES t1 (pk)) ENGINE=INNODB;
|
||||||
|
SET @@SESSION.foreign_key_checks = 0;
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
TRUNCATE TABLE t2;
|
||||||
|
TRUNCATE TABLE t3;
|
||||||
|
SET @@SESSION.foreign_key_checks = 1;
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`fk`) REFERENCES `test`.`t1` (`pk`))
|
||||||
|
TRUNCATE TABLE t2;
|
||||||
|
TRUNCATE TABLE t3;
|
||||||
|
LOCK TABLES t1 WRITE;
|
||||||
|
SET @@SESSION.foreign_key_checks = 0;
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
SET @@SESSION.foreign_key_checks = 1;
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`fk`) REFERENCES `test`.`t1` (`pk`))
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE t3,t2,t1;
|
||||||
|
SET @@SESSION.foreign_key_checks = @old_foreign_key_checks;
|
||||||
|
#
|
||||||
|
# Test that TRUNCATE resets auto-increment.
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT PRIMARY KEY NOT NULL AUTO_INCREMENT);
|
||||||
|
INSERT INTO t1 VALUES (NULL), (NULL);
|
||||||
|
SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't1';
|
||||||
|
AUTO_INCREMENT
|
||||||
|
3
|
||||||
|
SELECT * FROM t1 ORDER BY a;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't1';
|
||||||
|
AUTO_INCREMENT
|
||||||
|
1
|
||||||
|
INSERT INTO t1 VALUES (NULL), (NULL);
|
||||||
|
SELECT * FROM t1 ORDER BY a;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
DROP TABLE t1;
|
|
@ -394,8 +394,8 @@ table_schema table_name row_format
|
||||||
test t8 Compact
|
test t8 Compact
|
||||||
test t9 Redundant
|
test t9 Redundant
|
||||||
drop table t8, t9;
|
drop table t8, t9;
|
||||||
set global innodb_file_per_table=1;
|
set global innodb_file_per_table=0;
|
||||||
set global innodb_file_format=Barracuda;
|
set global innodb_file_format=Antelope;
|
||||||
set global innodb_file_per_table=on;
|
set global innodb_file_per_table=on;
|
||||||
set global innodb_file_format=`Barracuda`;
|
set global innodb_file_format=`Barracuda`;
|
||||||
set global innodb_file_format_max=`Antelope`;
|
set global innodb_file_format_max=`Antelope`;
|
||||||
|
|
|
@ -2424,10 +2424,6 @@ drop table t1,t2;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
id INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)
|
id INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
CREATE TABLE t2 (
|
|
||||||
id INTEGER NOT NULL,
|
|
||||||
FOREIGN KEY (id) REFERENCES t1 (id)
|
|
||||||
) ENGINE=InnoDB;
|
|
||||||
INSERT INTO t1 (id) VALUES (NULL);
|
INSERT INTO t1 (id) VALUES (NULL);
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
id
|
id
|
||||||
|
@ -2443,7 +2439,7 @@ INSERT INTO t1 (id) VALUES (NULL);
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
id
|
id
|
||||||
1
|
1
|
||||||
DROP TABLE t2, t1;
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1
|
CREATE TABLE t1
|
||||||
(
|
(
|
||||||
id INT PRIMARY KEY
|
id INT PRIMARY KEY
|
||||||
|
@ -2621,13 +2617,15 @@ ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fail
|
||||||
update t4 set a=2;
|
update t4 set a=2;
|
||||||
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t3` (`a`))
|
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t3` (`a`))
|
||||||
truncate t1;
|
truncate t1;
|
||||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t1` (`a`))
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t1` (`a`))
|
||||||
truncate t3;
|
truncate t3;
|
||||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `t3` (`a`))
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t3` (`a`))
|
||||||
truncate t2;
|
truncate t2;
|
||||||
truncate t4;
|
truncate t4;
|
||||||
truncate t1;
|
truncate t1;
|
||||||
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t1` (`a`))
|
||||||
truncate t3;
|
truncate t3;
|
||||||
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t4`, CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`a`) REFERENCES `test`.`t3` (`a`))
|
||||||
drop table t4,t3,t2,t1;
|
drop table t4,t3,t2,t1;
|
||||||
create table t1 (a varchar(255) character set utf8,
|
create table t1 (a varchar(255) character set utf8,
|
||||||
b varchar(255) character set utf8,
|
b varchar(255) character set utf8,
|
||||||
|
|
|
@ -125,6 +125,6 @@ Warning 1264 Out of range value for column 'col78' at row 1
|
||||||
Warning 1265 Data truncated for column 'col79' at row 1
|
Warning 1265 Data truncated for column 'col79' at row 1
|
||||||
Warning 1264 Out of range value for column 'col84' at row 1
|
Warning 1264 Out of range value for column 'col84' at row 1
|
||||||
DROP TABLE bug52745;
|
DROP TABLE bug52745;
|
||||||
SET GLOBAL innodb_file_format=Barracuda;
|
SET GLOBAL innodb_file_format=Antelope;
|
||||||
SET GLOBAL innodb_file_format_max=Antelope;
|
SET GLOBAL innodb_file_format_max=Antelope;
|
||||||
SET GLOBAL innodb_file_per_table=1;
|
SET GLOBAL innodb_file_per_table=0;
|
||||||
|
|
|
@ -11,6 +11,6 @@ Error 139 Too big row
|
||||||
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
|
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs
|
||||||
Error 1030 Got error 139 from storage engine
|
Error 1030 Got error 139 from storage engine
|
||||||
DROP TABLE bug53591;
|
DROP TABLE bug53591;
|
||||||
SET GLOBAL innodb_file_format=Barracuda;
|
SET GLOBAL innodb_file_format=Antelope;
|
||||||
SET GLOBAL innodb_file_format_max=Antelope;
|
SET GLOBAL innodb_file_format_max=Antelope;
|
||||||
SET GLOBAL innodb_file_per_table=1;
|
SET GLOBAL innodb_file_per_table=0;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
select @@innodb_file_format;
|
select @@innodb_file_format;
|
||||||
@@innodb_file_format
|
@@innodb_file_format
|
||||||
Barracuda
|
Antelope
|
||||||
select @@innodb_file_format_check;
|
select @@innodb_file_format_check;
|
||||||
@@innodb_file_format_check
|
@@innodb_file_format_check
|
||||||
1
|
1
|
||||||
|
@ -17,14 +17,14 @@ Barracuda
|
||||||
set global innodb_file_format=default;
|
set global innodb_file_format=default;
|
||||||
select @@innodb_file_format;
|
select @@innodb_file_format;
|
||||||
@@innodb_file_format
|
@@innodb_file_format
|
||||||
Barracuda
|
Antelope
|
||||||
set global innodb_file_format=on;
|
set global innodb_file_format=on;
|
||||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON'
|
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON'
|
||||||
set global innodb_file_format=off;
|
set global innodb_file_format=off;
|
||||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
|
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
|
||||||
select @@innodb_file_format;
|
select @@innodb_file_format;
|
||||||
@@innodb_file_format
|
@@innodb_file_format
|
||||||
Barracuda
|
Antelope
|
||||||
set global innodb_file_format_max=antelope;
|
set global innodb_file_format_max=antelope;
|
||||||
set global innodb_file_format_max=barracuda;
|
set global innodb_file_format_max=barracuda;
|
||||||
set global innodb_file_format_max=cheetah;
|
set global innodb_file_format_max=cheetah;
|
||||||
|
@ -46,5 +46,5 @@ Antelope
|
||||||
set global innodb_file_format_max=antelope;
|
set global innodb_file_format_max=antelope;
|
||||||
set global innodb_file_format_check=off;
|
set global innodb_file_format_check=off;
|
||||||
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||||
SET GLOBAL innodb_file_format=Barracuda;
|
SET GLOBAL innodb_file_format=Antelope;
|
||||||
SET GLOBAL innodb_file_format_max=Antelope;
|
SET GLOBAL innodb_file_format_max=Antelope;
|
||||||
|
|
|
@ -1941,7 +1941,7 @@ INSERT INTO t2 VALUES (3,2);
|
||||||
SET AUTOCOMMIT = 0;
|
SET AUTOCOMMIT = 0;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`))
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `test`.`t1` (`id`))
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
id
|
id
|
||||||
1
|
1
|
||||||
|
@ -1953,7 +1953,7 @@ id
|
||||||
2
|
2
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`))
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `test`.`t1` (`id`))
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
id
|
id
|
||||||
1
|
1
|
||||||
|
@ -1971,7 +1971,7 @@ id
|
||||||
2
|
2
|
||||||
COMMIT;
|
COMMIT;
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `t1` (`id`))
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `test`.`t1` (`id`))
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
id
|
id
|
||||||
1
|
1
|
||||||
|
@ -1983,9 +1983,12 @@ id
|
||||||
1
|
1
|
||||||
2
|
2
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_id`) REFERENCES `test`.`t1` (`id`))
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
id
|
id
|
||||||
|
1
|
||||||
|
2
|
||||||
TRUNCATE TABLE t2;
|
TRUNCATE TABLE t2;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -2077,9 +2080,9 @@ i i
|
||||||
** error handling inside a row iteration.
|
** error handling inside a row iteration.
|
||||||
**
|
**
|
||||||
DROP TRIGGER trg;
|
DROP TRIGGER trg;
|
||||||
TRUNCATE TABLE t1;
|
DELETE FROM t1;
|
||||||
TRUNCATE TABLE t2;
|
DELETE FROM t2;
|
||||||
TRUNCATE TABLE t3;
|
DELETE FROM t3;
|
||||||
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||||
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
||||||
INSERT INTO t4 VALUES (3,3),(4,4);
|
INSERT INTO t4 VALUES (3,3),(4,4);
|
||||||
|
@ -2105,9 +2108,9 @@ DROP TRIGGER trg;
|
||||||
**
|
**
|
||||||
** Induce an error midway through an AFTER-trigger
|
** Induce an error midway through an AFTER-trigger
|
||||||
**
|
**
|
||||||
TRUNCATE TABLE t4;
|
DELETE FROM t4;
|
||||||
TRUNCATE TABLE t1;
|
DELETE FROM t1;
|
||||||
TRUNCATE TABLE t3;
|
DELETE FROM t3;
|
||||||
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||||
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
||||||
CREATE TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW
|
CREATE TRIGGER trg AFTER DELETE ON t1 FOR EACH ROW
|
||||||
|
|
65
mysql-test/suite/innodb/t/innodb-truncate.test
Normal file
65
mysql-test/suite/innodb/t/innodb-truncate.test
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # TRUNCATE TABLE
|
||||||
|
--echo #
|
||||||
|
--echo # Truncating is disallowed for parent tables unless such table
|
||||||
|
--echo # participates in self-referencing foreign keys only.
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB;
|
||||||
|
CREATE TABLE t2 (fk INT NOT NULL, FOREIGN KEY (fk) REFERENCES t1 (pk)) ENGINE=INNODB;
|
||||||
|
--error ER_TRUNCATE_ILLEGAL_FK
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
--echo # Truncation of child should succeed.
|
||||||
|
TRUNCATE TABLE t2;
|
||||||
|
DROP TABLE t2;
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY, fk INT,
|
||||||
|
FOREIGN KEY (fk) REFERENCES t1 (pk)) ENGINE=INNODB;
|
||||||
|
--echo # Truncation of self-referencing table should succeed.
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Also, truncating such tables is allowed if foreign key
|
||||||
|
--echo # checks are disabled.
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET @old_foreign_key_checks = @@SESSION.foreign_key_checks;
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=INNODB;
|
||||||
|
CREATE TABLE t2 (fk INT NOT NULL, FOREIGN KEY (fk) REFERENCES t1 (pk)) ENGINE=INNODB;
|
||||||
|
CREATE TABLE t3 (pk INT PRIMARY KEY, fk INT,
|
||||||
|
FOREIGN KEY (fk) REFERENCES t1 (pk)) ENGINE=INNODB;
|
||||||
|
SET @@SESSION.foreign_key_checks = 0;
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
TRUNCATE TABLE t2;
|
||||||
|
TRUNCATE TABLE t3;
|
||||||
|
SET @@SESSION.foreign_key_checks = 1;
|
||||||
|
--error ER_TRUNCATE_ILLEGAL_FK
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
TRUNCATE TABLE t2;
|
||||||
|
TRUNCATE TABLE t3;
|
||||||
|
LOCK TABLES t1 WRITE;
|
||||||
|
SET @@SESSION.foreign_key_checks = 0;
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
SET @@SESSION.foreign_key_checks = 1;
|
||||||
|
--error ER_TRUNCATE_ILLEGAL_FK
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE t3,t2,t1;
|
||||||
|
SET @@SESSION.foreign_key_checks = @old_foreign_key_checks;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Test that TRUNCATE resets auto-increment.
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a INT PRIMARY KEY NOT NULL AUTO_INCREMENT);
|
||||||
|
INSERT INTO t1 VALUES (NULL), (NULL);
|
||||||
|
SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't1';
|
||||||
|
SELECT * FROM t1 ORDER BY a;
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't1';
|
||||||
|
INSERT INTO t1 VALUES (NULL), (NULL);
|
||||||
|
SELECT * FROM t1 ORDER BY a;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
|
@ -1471,11 +1471,6 @@ CREATE TABLE t1 (
|
||||||
id INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)
|
id INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)
|
||||||
) ENGINE=InnoDB;
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
CREATE TABLE t2 (
|
|
||||||
id INTEGER NOT NULL,
|
|
||||||
FOREIGN KEY (id) REFERENCES t1 (id)
|
|
||||||
) ENGINE=InnoDB;
|
|
||||||
|
|
||||||
INSERT INTO t1 (id) VALUES (NULL);
|
INSERT INTO t1 (id) VALUES (NULL);
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
TRUNCATE t1;
|
TRUNCATE t1;
|
||||||
|
@ -1488,7 +1483,7 @@ DELETE FROM t1;
|
||||||
TRUNCATE t1;
|
TRUNCATE t1;
|
||||||
INSERT INTO t1 (id) VALUES (NULL);
|
INSERT INTO t1 (id) VALUES (NULL);
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
DROP TABLE t2, t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
# Test that foreign keys in temporary tables are not accepted (bug #12084)
|
# Test that foreign keys in temporary tables are not accepted (bug #12084)
|
||||||
CREATE TABLE t1
|
CREATE TABLE t1
|
||||||
|
@ -1723,13 +1718,15 @@ update t2 set a=2;
|
||||||
update t3 set a=2;
|
update t3 set a=2;
|
||||||
-- error 1452
|
-- error 1452
|
||||||
update t4 set a=2;
|
update t4 set a=2;
|
||||||
-- error 1451
|
-- error ER_TRUNCATE_ILLEGAL_FK
|
||||||
truncate t1;
|
truncate t1;
|
||||||
-- error 1451
|
-- error ER_TRUNCATE_ILLEGAL_FK
|
||||||
truncate t3;
|
truncate t3;
|
||||||
truncate t2;
|
truncate t2;
|
||||||
truncate t4;
|
truncate t4;
|
||||||
|
-- error ER_TRUNCATE_ILLEGAL_FK
|
||||||
truncate t1;
|
truncate t1;
|
||||||
|
-- error ER_TRUNCATE_ILLEGAL_FK
|
||||||
truncate t3;
|
truncate t3;
|
||||||
|
|
||||||
drop table t4,t3,t2,t1;
|
drop table t4,t3,t2,t1;
|
||||||
|
|
|
@ -151,14 +151,14 @@ INSERT INTO t2 VALUES (3,2);
|
||||||
SET AUTOCOMMIT = 0;
|
SET AUTOCOMMIT = 0;
|
||||||
|
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
--error ER_ROW_IS_REFERENCED_2
|
--error ER_TRUNCATE_ILLEGAL_FK
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
|
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
--error ER_ROW_IS_REFERENCED_2
|
--error ER_TRUNCATE_ILLEGAL_FK
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
|
@ -170,13 +170,14 @@ START TRANSACTION;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
--error ER_ROW_IS_REFERENCED_2
|
--error ER_TRUNCATE_ILLEGAL_FK
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
DELETE FROM t2 WHERE id = 3;
|
DELETE FROM t2 WHERE id = 3;
|
||||||
|
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
|
--error ER_TRUNCATE_ILLEGAL_FK
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
SELECT * FROM t1;
|
SELECT * FROM t1;
|
||||||
|
@ -275,9 +276,9 @@ SELECT * FROM t1 LEFT JOIN t3 ON t1.i=t3.i;
|
||||||
--echo ** error handling inside a row iteration.
|
--echo ** error handling inside a row iteration.
|
||||||
--echo **
|
--echo **
|
||||||
DROP TRIGGER trg;
|
DROP TRIGGER trg;
|
||||||
TRUNCATE TABLE t1;
|
DELETE FROM t1;
|
||||||
TRUNCATE TABLE t2;
|
DELETE FROM t2;
|
||||||
TRUNCATE TABLE t3;
|
DELETE FROM t3;
|
||||||
|
|
||||||
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||||
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
||||||
|
@ -304,9 +305,9 @@ DROP TRIGGER trg;
|
||||||
--echo **
|
--echo **
|
||||||
--echo ** Induce an error midway through an AFTER-trigger
|
--echo ** Induce an error midway through an AFTER-trigger
|
||||||
--echo **
|
--echo **
|
||||||
TRUNCATE TABLE t4;
|
DELETE FROM t4;
|
||||||
TRUNCATE TABLE t1;
|
DELETE FROM t1;
|
||||||
TRUNCATE TABLE t3;
|
DELETE FROM t3;
|
||||||
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||||
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
||||||
delimiter ||;
|
delimiter ||;
|
||||||
|
|
|
@ -177,7 +177,7 @@ let $any_unique= `SELECT @my_errno IN ($ER_DUP_KEY,$ER_DUP_ENTRY)`;
|
||||||
# @my_errno AS sql_errno;
|
# @my_errno AS sql_errno;
|
||||||
if (`SELECT @my_errno NOT IN (0,$ER_DUP_KEY,$ER_DUP_ENTRY)`)
|
if (`SELECT @my_errno NOT IN (0,$ER_DUP_KEY,$ER_DUP_ENTRY)`)
|
||||||
{
|
{
|
||||||
--echo # The last command got an unexepected error response.
|
--echo # The last command got an unexpected error response.
|
||||||
--echo # Expected/handled SQL codes are 0,$ER_DUP_KEY,$ER_DUP_ENTRY
|
--echo # Expected/handled SQL codes are 0,$ER_DUP_KEY,$ER_DUP_ENTRY
|
||||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||||
--echo # Sorry, have to abort.
|
--echo # Sorry, have to abort.
|
||||||
|
@ -219,7 +219,7 @@ if ($any_unique)
|
||||||
# @my_errno AS sql_errno;
|
# @my_errno AS sql_errno;
|
||||||
if (`SELECT @my_errno NOT IN (0,$ER_DUP_KEY,$ER_DUP_ENTRY)`)
|
if (`SELECT @my_errno NOT IN (0,$ER_DUP_KEY,$ER_DUP_ENTRY)`)
|
||||||
{
|
{
|
||||||
--echo # The last command got an unexepected error response.
|
--echo # The last command got an unexpected error response.
|
||||||
--echo # Expected/handled SQL codes are 0,$ER_DUP_KEY,$ER_DUP_ENTRY
|
--echo # Expected/handled SQL codes are 0,$ER_DUP_KEY,$ER_DUP_ENTRY
|
||||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||||
--echo # Sorry, have to abort.
|
--echo # Sorry, have to abort.
|
||||||
|
@ -255,7 +255,7 @@ if ($any_unique)
|
||||||
# @my_errno AS sql_errno;
|
# @my_errno AS sql_errno;
|
||||||
if (`SELECT @my_errno NOT IN (0,$ER_DUP_KEY,$ER_DUP_ENTRY)`)
|
if (`SELECT @my_errno NOT IN (0,$ER_DUP_KEY,$ER_DUP_ENTRY)`)
|
||||||
{
|
{
|
||||||
--echo # The last command got an unexepected error response.
|
--echo # The last command got an unexpected error response.
|
||||||
--echo # Expected/handled SQL codes are 0,$ER_DUP_KEY,$ER_DUP_ENTRY
|
--echo # Expected/handled SQL codes are 0,$ER_DUP_KEY,$ER_DUP_ENTRY
|
||||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||||
--echo # Sorry, have to abort.
|
--echo # Sorry, have to abort.
|
||||||
|
@ -503,7 +503,7 @@ if ($no_debug)
|
||||||
eval SET @my_errno = $mysql_errno;
|
eval SET @my_errno = $mysql_errno;
|
||||||
if (`SELECT @my_errno NOT IN (0,$ER_SAME_NAME_PARTITION,$ER_NO_PARTITION_FOR_GIVEN_VALUE)`)
|
if (`SELECT @my_errno NOT IN (0,$ER_SAME_NAME_PARTITION,$ER_NO_PARTITION_FOR_GIVEN_VALUE)`)
|
||||||
{
|
{
|
||||||
--echo # The last command got an unexepected error response.
|
--echo # The last command got an unexpected error response.
|
||||||
--echo # Expected/handled SQL codes are 0,$ER_SAME_NAME_PARTITION,$ER_NO_PARTITION_FOR_GIVEN_VALUE
|
--echo # Expected/handled SQL codes are 0,$ER_SAME_NAME_PARTITION,$ER_NO_PARTITION_FOR_GIVEN_VALUE
|
||||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||||
--echo # Sorry, have to abort.
|
--echo # Sorry, have to abort.
|
||||||
|
@ -566,7 +566,7 @@ eval SET @my_errno = $mysql_errno;
|
||||||
let $run= `SELECT @my_errno = 0`;
|
let $run= `SELECT @my_errno = 0`;
|
||||||
if (`SELECT @my_errno NOT IN (0,$ER_BAD_NULL_ERROR)`)
|
if (`SELECT @my_errno NOT IN (0,$ER_BAD_NULL_ERROR)`)
|
||||||
{
|
{
|
||||||
--echo # The last command got an unexepected error response.
|
--echo # The last command got an unexpected error response.
|
||||||
--echo # Expected/handled SQL codes are 0,$ER_BAD_NULL_ERROR
|
--echo # Expected/handled SQL codes are 0,$ER_BAD_NULL_ERROR
|
||||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||||
--echo # Sorry, have to abort.
|
--echo # Sorry, have to abort.
|
||||||
|
|
|
@ -57,7 +57,6 @@ t1 CREATE TABLE `t1` (
|
||||||
`f_varchar` varchar(30) DEFAULT NULL
|
`f_varchar` varchar(30) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.ibd
|
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||||
|
@ -79,7 +78,6 @@ t1 CREATE TABLE `t1` (
|
||||||
`f_varchar` varchar(30) DEFAULT NULL
|
`f_varchar` varchar(30) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
/*!50100 PARTITION BY HASH (YEAR(f_date)) */
|
/*!50100 PARTITION BY HASH (YEAR(f_date)) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -98,7 +96,6 @@ t1 CREATE TABLE `t1` (
|
||||||
`f_varchar` varchar(30) DEFAULT NULL
|
`f_varchar` varchar(30) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
/*!50100 PARTITION BY HASH (DAYOFYEAR(f_date)) */
|
/*!50100 PARTITION BY HASH (DAYOFYEAR(f_date)) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -115,7 +112,6 @@ t1 CREATE TABLE `t1` (
|
||||||
`f_varchar` varchar(30) DEFAULT NULL
|
`f_varchar` varchar(30) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
/*!50100 PARTITION BY HASH (YEAR(f_date)) */
|
/*!50100 PARTITION BY HASH (YEAR(f_date)) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -141,9 +137,6 @@ t1 CREATE TABLE `t1` (
|
||||||
(PARTITION p0 ENGINE = InnoDB,
|
(PARTITION p0 ENGINE = InnoDB,
|
||||||
PARTITION part1 ENGINE = InnoDB,
|
PARTITION part1 ENGINE = InnoDB,
|
||||||
PARTITION part7 ENGINE = InnoDB) */
|
PARTITION part7 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -168,10 +161,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part1 ENGINE = InnoDB,
|
PARTITION part1 ENGINE = InnoDB,
|
||||||
PARTITION part7 ENGINE = InnoDB,
|
PARTITION part7 ENGINE = InnoDB,
|
||||||
PARTITION part2 ENGINE = InnoDB) */
|
PARTITION part2 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -197,14 +186,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION p5 ENGINE = InnoDB,
|
PARTITION p5 ENGINE = InnoDB,
|
||||||
PARTITION p6 ENGINE = InnoDB,
|
PARTITION p6 ENGINE = InnoDB,
|
||||||
PARTITION p7 ENGINE = InnoDB) */
|
PARTITION p7 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1#P#p5.ibd
|
|
||||||
t1#P#p6.ibd
|
|
||||||
t1#P#p7.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -241,13 +222,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION p4 ENGINE = InnoDB,
|
PARTITION p4 ENGINE = InnoDB,
|
||||||
PARTITION p5 ENGINE = InnoDB,
|
PARTITION p5 ENGINE = InnoDB,
|
||||||
PARTITION p6 ENGINE = InnoDB) */
|
PARTITION p6 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1#P#p5.ibd
|
|
||||||
t1#P#p6.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -270,12 +244,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part2 ENGINE = InnoDB,
|
PARTITION part2 ENGINE = InnoDB,
|
||||||
PARTITION p4 ENGINE = InnoDB,
|
PARTITION p4 ENGINE = InnoDB,
|
||||||
PARTITION p5 ENGINE = InnoDB) */
|
PARTITION p5 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1#P#p5.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -297,11 +265,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part7 ENGINE = InnoDB,
|
PARTITION part7 ENGINE = InnoDB,
|
||||||
PARTITION part2 ENGINE = InnoDB,
|
PARTITION part2 ENGINE = InnoDB,
|
||||||
PARTITION p4 ENGINE = InnoDB) */
|
PARTITION p4 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -322,10 +285,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part1 ENGINE = InnoDB,
|
PARTITION part1 ENGINE = InnoDB,
|
||||||
PARTITION part7 ENGINE = InnoDB,
|
PARTITION part7 ENGINE = InnoDB,
|
||||||
PARTITION part2 ENGINE = InnoDB) */
|
PARTITION part2 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -345,9 +304,6 @@ t1 CREATE TABLE `t1` (
|
||||||
(PARTITION p0 ENGINE = InnoDB,
|
(PARTITION p0 ENGINE = InnoDB,
|
||||||
PARTITION part1 ENGINE = InnoDB,
|
PARTITION part1 ENGINE = InnoDB,
|
||||||
PARTITION part7 ENGINE = InnoDB) */
|
PARTITION part7 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -366,8 +322,6 @@ t1 CREATE TABLE `t1` (
|
||||||
/*!50100 PARTITION BY HASH (YEAR(f_date))
|
/*!50100 PARTITION BY HASH (YEAR(f_date))
|
||||||
(PARTITION p0 ENGINE = InnoDB,
|
(PARTITION p0 ENGINE = InnoDB,
|
||||||
PARTITION part1 ENGINE = InnoDB) */
|
PARTITION part1 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -385,7 +339,6 @@ t1 CREATE TABLE `t1` (
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
/*!50100 PARTITION BY HASH (YEAR(f_date))
|
/*!50100 PARTITION BY HASH (YEAR(f_date))
|
||||||
(PARTITION p0 ENGINE = InnoDB) */
|
(PARTITION p0 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
|
@ -406,7 +359,6 @@ t1 CREATE TABLE `t1` (
|
||||||
`f_varchar` varchar(30) DEFAULT NULL
|
`f_varchar` varchar(30) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.ibd
|
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
|
||||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||||
|
@ -446,7 +398,6 @@ t1 CREATE TABLE `t1` (
|
||||||
`f_charbig` varchar(1000) DEFAULT NULL
|
`f_charbig` varchar(1000) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.ibd
|
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||||
|
@ -469,7 +420,6 @@ t1 CREATE TABLE `t1` (
|
||||||
`f_charbig` varchar(1000) DEFAULT NULL
|
`f_charbig` varchar(1000) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
/*!50100 PARTITION BY KEY (f_int1) */
|
/*!50100 PARTITION BY KEY (f_int1) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
|
@ -498,9 +448,6 @@ t1 CREATE TABLE `t1` (
|
||||||
(PARTITION p0 ENGINE = InnoDB,
|
(PARTITION p0 ENGINE = InnoDB,
|
||||||
PARTITION part1 ENGINE = InnoDB,
|
PARTITION part1 ENGINE = InnoDB,
|
||||||
PARTITION part7 ENGINE = InnoDB) */
|
PARTITION part7 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
|
@ -525,10 +472,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part1 ENGINE = InnoDB,
|
PARTITION part1 ENGINE = InnoDB,
|
||||||
PARTITION part7 ENGINE = InnoDB,
|
PARTITION part7 ENGINE = InnoDB,
|
||||||
PARTITION part2 ENGINE = InnoDB) */
|
PARTITION part2 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
|
@ -557,14 +500,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION p5 ENGINE = InnoDB,
|
PARTITION p5 ENGINE = InnoDB,
|
||||||
PARTITION p6 ENGINE = InnoDB,
|
PARTITION p6 ENGINE = InnoDB,
|
||||||
PARTITION p7 ENGINE = InnoDB) */
|
PARTITION p7 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1#P#p5.ibd
|
|
||||||
t1#P#p6.ibd
|
|
||||||
t1#P#p7.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
|
@ -599,13 +534,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION p4 ENGINE = InnoDB,
|
PARTITION p4 ENGINE = InnoDB,
|
||||||
PARTITION p5 ENGINE = InnoDB,
|
PARTITION p5 ENGINE = InnoDB,
|
||||||
PARTITION p6 ENGINE = InnoDB) */
|
PARTITION p6 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1#P#p5.ibd
|
|
||||||
t1#P#p6.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
|
@ -631,12 +559,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part2 ENGINE = InnoDB,
|
PARTITION part2 ENGINE = InnoDB,
|
||||||
PARTITION p4 ENGINE = InnoDB,
|
PARTITION p4 ENGINE = InnoDB,
|
||||||
PARTITION p5 ENGINE = InnoDB) */
|
PARTITION p5 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1#P#p5.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
|
@ -661,11 +583,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part7 ENGINE = InnoDB,
|
PARTITION part7 ENGINE = InnoDB,
|
||||||
PARTITION part2 ENGINE = InnoDB,
|
PARTITION part2 ENGINE = InnoDB,
|
||||||
PARTITION p4 ENGINE = InnoDB) */
|
PARTITION p4 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
|
@ -689,10 +606,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part1 ENGINE = InnoDB,
|
PARTITION part1 ENGINE = InnoDB,
|
||||||
PARTITION part7 ENGINE = InnoDB,
|
PARTITION part7 ENGINE = InnoDB,
|
||||||
PARTITION part2 ENGINE = InnoDB) */
|
PARTITION part2 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
|
@ -715,9 +628,6 @@ t1 CREATE TABLE `t1` (
|
||||||
(PARTITION p0 ENGINE = InnoDB,
|
(PARTITION p0 ENGINE = InnoDB,
|
||||||
PARTITION part1 ENGINE = InnoDB,
|
PARTITION part1 ENGINE = InnoDB,
|
||||||
PARTITION part7 ENGINE = InnoDB) */
|
PARTITION part7 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part7.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
|
@ -739,8 +649,6 @@ t1 CREATE TABLE `t1` (
|
||||||
/*!50100 PARTITION BY KEY (f_int1)
|
/*!50100 PARTITION BY KEY (f_int1)
|
||||||
(PARTITION p0 ENGINE = InnoDB,
|
(PARTITION p0 ENGINE = InnoDB,
|
||||||
PARTITION part1 ENGINE = InnoDB) */
|
PARTITION part1 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
|
@ -761,7 +669,6 @@ t1 CREATE TABLE `t1` (
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
/*!50100 PARTITION BY KEY (f_int1)
|
/*!50100 PARTITION BY KEY (f_int1)
|
||||||
(PARTITION p0 ENGINE = InnoDB) */
|
(PARTITION p0 ENGINE = InnoDB) */
|
||||||
t1#P#p0.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
|
@ -785,7 +692,6 @@ t1 CREATE TABLE `t1` (
|
||||||
`f_charbig` varchar(1000) DEFAULT NULL
|
`f_charbig` varchar(1000) DEFAULT NULL
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.ibd
|
|
||||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||||
|
|
|
@ -77,8 +77,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 2 */
|
PARTITIONS 2 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -534,11 +532,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 5 */
|
PARTITIONS 5 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1#P#p2.ibd
|
|
||||||
t1#P#p3.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -1009,14 +1002,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part3.ibd
|
|
||||||
t1#P#part_1.ibd
|
|
||||||
t1#P#part_2.ibd
|
|
||||||
t1#P#part_3.ibd
|
|
||||||
t1#P#part_N.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -1483,12 +1468,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta.ibd
|
|
||||||
t1#P#partb.ibd
|
|
||||||
t1#P#partc.ibd
|
|
||||||
t1#P#partd.ibd
|
|
||||||
t1#P#parte.ibd
|
|
||||||
t1#P#partf.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -1951,14 +1930,6 @@ SUBPARTITIONS 2
|
||||||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta#SP#partasp0.ibd
|
|
||||||
t1#P#parta#SP#partasp1.ibd
|
|
||||||
t1#P#partb#SP#partbsp0.ibd
|
|
||||||
t1#P#partb#SP#partbsp1.ibd
|
|
||||||
t1#P#partc#SP#partcsp0.ibd
|
|
||||||
t1#P#partc#SP#partcsp1.ibd
|
|
||||||
t1#P#partd#SP#partdsp0.ibd
|
|
||||||
t1#P#partd#SP#partdsp1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -2434,14 +2405,6 @@ SUBPARTITION BY KEY (f_int1)
|
||||||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#subpart11.ibd
|
|
||||||
t1#P#part1#SP#subpart12.ibd
|
|
||||||
t1#P#part2#SP#subpart21.ibd
|
|
||||||
t1#P#part2#SP#subpart22.ibd
|
|
||||||
t1#P#part3#SP#subpart31.ibd
|
|
||||||
t1#P#part3#SP#subpart32.ibd
|
|
||||||
t1#P#part4#SP#subpart41.ibd
|
|
||||||
t1#P#part4#SP#subpart42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -2919,14 +2882,6 @@ SUBPARTITION BY HASH (f_int1 + 1)
|
||||||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#sp11.ibd
|
|
||||||
t1#P#part1#SP#sp12.ibd
|
|
||||||
t1#P#part2#SP#sp21.ibd
|
|
||||||
t1#P#part2#SP#sp22.ibd
|
|
||||||
t1#P#part3#SP#sp31.ibd
|
|
||||||
t1#P#part3#SP#sp32.ibd
|
|
||||||
t1#P#part4#SP#sp41.ibd
|
|
||||||
t1#P#part4#SP#sp42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -3390,15 +3345,6 @@ SUBPARTITIONS 3
|
||||||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#part1sp0.ibd
|
|
||||||
t1#P#part1#SP#part1sp1.ibd
|
|
||||||
t1#P#part1#SP#part1sp2.ibd
|
|
||||||
t1#P#part2#SP#part2sp0.ibd
|
|
||||||
t1#P#part2#SP#part2sp1.ibd
|
|
||||||
t1#P#part2#SP#part2sp2.ibd
|
|
||||||
t1#P#part3#SP#part3sp0.ibd
|
|
||||||
t1#P#part3#SP#part3sp1.ibd
|
|
||||||
t1#P#part3#SP#part3sp2.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -3856,8 +3802,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 2 */
|
PARTITIONS 2 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -4313,11 +4257,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 5 */
|
PARTITIONS 5 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1#P#p2.ibd
|
|
||||||
t1#P#p3.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -4788,14 +4727,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part3.ibd
|
|
||||||
t1#P#part_1.ibd
|
|
||||||
t1#P#part_2.ibd
|
|
||||||
t1#P#part_3.ibd
|
|
||||||
t1#P#part_N.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -5262,12 +5193,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta.ibd
|
|
||||||
t1#P#partb.ibd
|
|
||||||
t1#P#partc.ibd
|
|
||||||
t1#P#partd.ibd
|
|
||||||
t1#P#parte.ibd
|
|
||||||
t1#P#partf.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -5730,14 +5655,6 @@ SUBPARTITIONS 2
|
||||||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta#SP#partasp0.ibd
|
|
||||||
t1#P#parta#SP#partasp1.ibd
|
|
||||||
t1#P#partb#SP#partbsp0.ibd
|
|
||||||
t1#P#partb#SP#partbsp1.ibd
|
|
||||||
t1#P#partc#SP#partcsp0.ibd
|
|
||||||
t1#P#partc#SP#partcsp1.ibd
|
|
||||||
t1#P#partd#SP#partdsp0.ibd
|
|
||||||
t1#P#partd#SP#partdsp1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -6211,14 +6128,6 @@ SUBPARTITION BY KEY (f_int2)
|
||||||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#subpart11.ibd
|
|
||||||
t1#P#part1#SP#subpart12.ibd
|
|
||||||
t1#P#part2#SP#subpart21.ibd
|
|
||||||
t1#P#part2#SP#subpart22.ibd
|
|
||||||
t1#P#part3#SP#subpart31.ibd
|
|
||||||
t1#P#part3#SP#subpart32.ibd
|
|
||||||
t1#P#part4#SP#subpart41.ibd
|
|
||||||
t1#P#part4#SP#subpart42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -6692,14 +6601,6 @@ SUBPARTITION BY HASH (f_int2 + 1)
|
||||||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#sp11.ibd
|
|
||||||
t1#P#part1#SP#sp12.ibd
|
|
||||||
t1#P#part2#SP#sp21.ibd
|
|
||||||
t1#P#part2#SP#sp22.ibd
|
|
||||||
t1#P#part3#SP#sp31.ibd
|
|
||||||
t1#P#part3#SP#sp32.ibd
|
|
||||||
t1#P#part4#SP#sp41.ibd
|
|
||||||
t1#P#part4#SP#sp42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -7163,15 +7064,6 @@ SUBPARTITIONS 3
|
||||||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#part1sp0.ibd
|
|
||||||
t1#P#part1#SP#part1sp1.ibd
|
|
||||||
t1#P#part1#SP#part1sp2.ibd
|
|
||||||
t1#P#part2#SP#part2sp0.ibd
|
|
||||||
t1#P#part2#SP#part2sp1.ibd
|
|
||||||
t1#P#part2#SP#part2sp2.ibd
|
|
||||||
t1#P#part3#SP#part3sp0.ibd
|
|
||||||
t1#P#part3#SP#part3sp1.ibd
|
|
||||||
t1#P#part3#SP#part3sp2.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -7635,8 +7527,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 2 */
|
PARTITIONS 2 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -8129,11 +8019,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 5 */
|
PARTITIONS 5 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1#P#p2.ibd
|
|
||||||
t1#P#p3.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -8641,14 +8526,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part3.ibd
|
|
||||||
t1#P#part_1.ibd
|
|
||||||
t1#P#part_2.ibd
|
|
||||||
t1#P#part_3.ibd
|
|
||||||
t1#P#part_N.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -9152,12 +9029,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta.ibd
|
|
||||||
t1#P#partb.ibd
|
|
||||||
t1#P#partc.ibd
|
|
||||||
t1#P#partd.ibd
|
|
||||||
t1#P#parte.ibd
|
|
||||||
t1#P#partf.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -9657,14 +9528,6 @@ SUBPARTITIONS 2
|
||||||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta#SP#partasp0.ibd
|
|
||||||
t1#P#parta#SP#partasp1.ibd
|
|
||||||
t1#P#partb#SP#partbsp0.ibd
|
|
||||||
t1#P#partb#SP#partbsp1.ibd
|
|
||||||
t1#P#partc#SP#partcsp0.ibd
|
|
||||||
t1#P#partc#SP#partcsp1.ibd
|
|
||||||
t1#P#partd#SP#partdsp0.ibd
|
|
||||||
t1#P#partd#SP#partdsp1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -10177,14 +10040,6 @@ SUBPARTITION BY KEY (f_int1)
|
||||||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#subpart11.ibd
|
|
||||||
t1#P#part1#SP#subpart12.ibd
|
|
||||||
t1#P#part2#SP#subpart21.ibd
|
|
||||||
t1#P#part2#SP#subpart22.ibd
|
|
||||||
t1#P#part3#SP#subpart31.ibd
|
|
||||||
t1#P#part3#SP#subpart32.ibd
|
|
||||||
t1#P#part4#SP#subpart41.ibd
|
|
||||||
t1#P#part4#SP#subpart42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -10699,14 +10554,6 @@ SUBPARTITION BY HASH (f_int1 + 1)
|
||||||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#sp11.ibd
|
|
||||||
t1#P#part1#SP#sp12.ibd
|
|
||||||
t1#P#part2#SP#sp21.ibd
|
|
||||||
t1#P#part2#SP#sp22.ibd
|
|
||||||
t1#P#part3#SP#sp31.ibd
|
|
||||||
t1#P#part3#SP#sp32.ibd
|
|
||||||
t1#P#part4#SP#sp41.ibd
|
|
||||||
t1#P#part4#SP#sp42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -11207,15 +11054,6 @@ SUBPARTITIONS 3
|
||||||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#part1sp0.ibd
|
|
||||||
t1#P#part1#SP#part1sp1.ibd
|
|
||||||
t1#P#part1#SP#part1sp2.ibd
|
|
||||||
t1#P#part2#SP#part2sp0.ibd
|
|
||||||
t1#P#part2#SP#part2sp1.ibd
|
|
||||||
t1#P#part2#SP#part2sp2.ibd
|
|
||||||
t1#P#part3#SP#part3sp0.ibd
|
|
||||||
t1#P#part3#SP#part3sp1.ibd
|
|
||||||
t1#P#part3#SP#part3sp2.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -11709,8 +11547,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 2 */
|
PARTITIONS 2 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -12203,11 +12039,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 5 */
|
PARTITIONS 5 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1#P#p2.ibd
|
|
||||||
t1#P#p3.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -12715,14 +12546,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part3.ibd
|
|
||||||
t1#P#part_1.ibd
|
|
||||||
t1#P#part_2.ibd
|
|
||||||
t1#P#part_3.ibd
|
|
||||||
t1#P#part_N.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -13226,12 +13049,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta.ibd
|
|
||||||
t1#P#partb.ibd
|
|
||||||
t1#P#partc.ibd
|
|
||||||
t1#P#partd.ibd
|
|
||||||
t1#P#parte.ibd
|
|
||||||
t1#P#partf.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -13731,14 +13548,6 @@ SUBPARTITIONS 2
|
||||||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta#SP#partasp0.ibd
|
|
||||||
t1#P#parta#SP#partasp1.ibd
|
|
||||||
t1#P#partb#SP#partbsp0.ibd
|
|
||||||
t1#P#partb#SP#partbsp1.ibd
|
|
||||||
t1#P#partc#SP#partcsp0.ibd
|
|
||||||
t1#P#partc#SP#partcsp1.ibd
|
|
||||||
t1#P#partd#SP#partdsp0.ibd
|
|
||||||
t1#P#partd#SP#partdsp1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -14251,14 +14060,6 @@ SUBPARTITION BY KEY (f_int1)
|
||||||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#subpart11.ibd
|
|
||||||
t1#P#part1#SP#subpart12.ibd
|
|
||||||
t1#P#part2#SP#subpart21.ibd
|
|
||||||
t1#P#part2#SP#subpart22.ibd
|
|
||||||
t1#P#part3#SP#subpart31.ibd
|
|
||||||
t1#P#part3#SP#subpart32.ibd
|
|
||||||
t1#P#part4#SP#subpart41.ibd
|
|
||||||
t1#P#part4#SP#subpart42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -14773,14 +14574,6 @@ SUBPARTITION BY HASH (f_int1 + 1)
|
||||||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#sp11.ibd
|
|
||||||
t1#P#part1#SP#sp12.ibd
|
|
||||||
t1#P#part2#SP#sp21.ibd
|
|
||||||
t1#P#part2#SP#sp22.ibd
|
|
||||||
t1#P#part3#SP#sp31.ibd
|
|
||||||
t1#P#part3#SP#sp32.ibd
|
|
||||||
t1#P#part4#SP#sp41.ibd
|
|
||||||
t1#P#part4#SP#sp42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -15281,15 +15074,6 @@ SUBPARTITIONS 3
|
||||||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#part1sp0.ibd
|
|
||||||
t1#P#part1#SP#part1sp1.ibd
|
|
||||||
t1#P#part1#SP#part1sp2.ibd
|
|
||||||
t1#P#part2#SP#part2sp0.ibd
|
|
||||||
t1#P#part2#SP#part2sp1.ibd
|
|
||||||
t1#P#part2#SP#part2sp2.ibd
|
|
||||||
t1#P#part3#SP#part3sp0.ibd
|
|
||||||
t1#P#part3#SP#part3sp1.ibd
|
|
||||||
t1#P#part3#SP#part3sp2.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -15783,8 +15567,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 2 */
|
PARTITIONS 2 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -16293,11 +16075,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 5 */
|
PARTITIONS 5 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1#P#p2.ibd
|
|
||||||
t1#P#p3.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -16821,14 +16598,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part3.ibd
|
|
||||||
t1#P#part_1.ibd
|
|
||||||
t1#P#part_2.ibd
|
|
||||||
t1#P#part_3.ibd
|
|
||||||
t1#P#part_N.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -17348,12 +17117,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta.ibd
|
|
||||||
t1#P#partb.ibd
|
|
||||||
t1#P#partc.ibd
|
|
||||||
t1#P#partd.ibd
|
|
||||||
t1#P#parte.ibd
|
|
||||||
t1#P#partf.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -17869,14 +17632,6 @@ SUBPARTITIONS 2
|
||||||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta#SP#partasp0.ibd
|
|
||||||
t1#P#parta#SP#partasp1.ibd
|
|
||||||
t1#P#partb#SP#partbsp0.ibd
|
|
||||||
t1#P#partb#SP#partbsp1.ibd
|
|
||||||
t1#P#partc#SP#partcsp0.ibd
|
|
||||||
t1#P#partc#SP#partcsp1.ibd
|
|
||||||
t1#P#partd#SP#partdsp0.ibd
|
|
||||||
t1#P#partd#SP#partdsp1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -18405,14 +18160,6 @@ SUBPARTITION BY KEY (f_int1)
|
||||||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#subpart11.ibd
|
|
||||||
t1#P#part1#SP#subpart12.ibd
|
|
||||||
t1#P#part2#SP#subpart21.ibd
|
|
||||||
t1#P#part2#SP#subpart22.ibd
|
|
||||||
t1#P#part3#SP#subpart31.ibd
|
|
||||||
t1#P#part3#SP#subpart32.ibd
|
|
||||||
t1#P#part4#SP#subpart41.ibd
|
|
||||||
t1#P#part4#SP#subpart42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -18943,14 +18690,6 @@ SUBPARTITION BY HASH (f_int1 + 1)
|
||||||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#sp11.ibd
|
|
||||||
t1#P#part1#SP#sp12.ibd
|
|
||||||
t1#P#part2#SP#sp21.ibd
|
|
||||||
t1#P#part2#SP#sp22.ibd
|
|
||||||
t1#P#part3#SP#sp31.ibd
|
|
||||||
t1#P#part3#SP#sp32.ibd
|
|
||||||
t1#P#part4#SP#sp41.ibd
|
|
||||||
t1#P#part4#SP#sp42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -19467,15 +19206,6 @@ SUBPARTITIONS 3
|
||||||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#part1sp0.ibd
|
|
||||||
t1#P#part1#SP#part1sp1.ibd
|
|
||||||
t1#P#part1#SP#part1sp2.ibd
|
|
||||||
t1#P#part2#SP#part2sp0.ibd
|
|
||||||
t1#P#part2#SP#part2sp1.ibd
|
|
||||||
t1#P#part2#SP#part2sp2.ibd
|
|
||||||
t1#P#part3#SP#part3sp0.ibd
|
|
||||||
t1#P#part3#SP#part3sp1.ibd
|
|
||||||
t1#P#part3#SP#part3sp2.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -19990,8 +19720,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 2 */
|
PARTITIONS 2 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -20484,11 +20212,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 5 */
|
PARTITIONS 5 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1#P#p2.ibd
|
|
||||||
t1#P#p3.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -20996,14 +20719,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part3.ibd
|
|
||||||
t1#P#part_1.ibd
|
|
||||||
t1#P#part_2.ibd
|
|
||||||
t1#P#part_3.ibd
|
|
||||||
t1#P#part_N.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -21507,12 +21222,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta.ibd
|
|
||||||
t1#P#partb.ibd
|
|
||||||
t1#P#partc.ibd
|
|
||||||
t1#P#partd.ibd
|
|
||||||
t1#P#parte.ibd
|
|
||||||
t1#P#partf.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -22012,14 +21721,6 @@ SUBPARTITIONS 2
|
||||||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta#SP#partasp0.ibd
|
|
||||||
t1#P#parta#SP#partasp1.ibd
|
|
||||||
t1#P#partb#SP#partbsp0.ibd
|
|
||||||
t1#P#partb#SP#partbsp1.ibd
|
|
||||||
t1#P#partc#SP#partcsp0.ibd
|
|
||||||
t1#P#partc#SP#partcsp1.ibd
|
|
||||||
t1#P#partd#SP#partdsp0.ibd
|
|
||||||
t1#P#partd#SP#partdsp1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -22530,14 +22231,6 @@ SUBPARTITION BY KEY (f_int2)
|
||||||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#subpart11.ibd
|
|
||||||
t1#P#part1#SP#subpart12.ibd
|
|
||||||
t1#P#part2#SP#subpart21.ibd
|
|
||||||
t1#P#part2#SP#subpart22.ibd
|
|
||||||
t1#P#part3#SP#subpart31.ibd
|
|
||||||
t1#P#part3#SP#subpart32.ibd
|
|
||||||
t1#P#part4#SP#subpart41.ibd
|
|
||||||
t1#P#part4#SP#subpart42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -23048,14 +22741,6 @@ SUBPARTITION BY HASH (f_int2 + 1)
|
||||||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#sp11.ibd
|
|
||||||
t1#P#part1#SP#sp12.ibd
|
|
||||||
t1#P#part2#SP#sp21.ibd
|
|
||||||
t1#P#part2#SP#sp22.ibd
|
|
||||||
t1#P#part3#SP#sp31.ibd
|
|
||||||
t1#P#part3#SP#sp32.ibd
|
|
||||||
t1#P#part4#SP#sp41.ibd
|
|
||||||
t1#P#part4#SP#sp42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -23556,15 +23241,6 @@ SUBPARTITIONS 3
|
||||||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#part1sp0.ibd
|
|
||||||
t1#P#part1#SP#part1sp1.ibd
|
|
||||||
t1#P#part1#SP#part1sp2.ibd
|
|
||||||
t1#P#part2#SP#part2sp0.ibd
|
|
||||||
t1#P#part2#SP#part2sp1.ibd
|
|
||||||
t1#P#part2#SP#part2sp2.ibd
|
|
||||||
t1#P#part3#SP#part3sp0.ibd
|
|
||||||
t1#P#part3#SP#part3sp1.ibd
|
|
||||||
t1#P#part3#SP#part3sp2.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -24058,8 +23734,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 2 */
|
PARTITIONS 2 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -24552,11 +24226,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 5 */
|
PARTITIONS 5 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1#P#p2.ibd
|
|
||||||
t1#P#p3.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -25064,14 +24733,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part3.ibd
|
|
||||||
t1#P#part_1.ibd
|
|
||||||
t1#P#part_2.ibd
|
|
||||||
t1#P#part_3.ibd
|
|
||||||
t1#P#part_N.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -25575,12 +25236,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta.ibd
|
|
||||||
t1#P#partb.ibd
|
|
||||||
t1#P#partc.ibd
|
|
||||||
t1#P#partd.ibd
|
|
||||||
t1#P#parte.ibd
|
|
||||||
t1#P#partf.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -26080,14 +25735,6 @@ SUBPARTITIONS 2
|
||||||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta#SP#partasp0.ibd
|
|
||||||
t1#P#parta#SP#partasp1.ibd
|
|
||||||
t1#P#partb#SP#partbsp0.ibd
|
|
||||||
t1#P#partb#SP#partbsp1.ibd
|
|
||||||
t1#P#partc#SP#partcsp0.ibd
|
|
||||||
t1#P#partc#SP#partcsp1.ibd
|
|
||||||
t1#P#partd#SP#partdsp0.ibd
|
|
||||||
t1#P#partd#SP#partdsp1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -26598,14 +26245,6 @@ SUBPARTITION BY KEY (f_int2)
|
||||||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#subpart11.ibd
|
|
||||||
t1#P#part1#SP#subpart12.ibd
|
|
||||||
t1#P#part2#SP#subpart21.ibd
|
|
||||||
t1#P#part2#SP#subpart22.ibd
|
|
||||||
t1#P#part3#SP#subpart31.ibd
|
|
||||||
t1#P#part3#SP#subpart32.ibd
|
|
||||||
t1#P#part4#SP#subpart41.ibd
|
|
||||||
t1#P#part4#SP#subpart42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -27116,14 +26755,6 @@ SUBPARTITION BY HASH (f_int2 + 1)
|
||||||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#sp11.ibd
|
|
||||||
t1#P#part1#SP#sp12.ibd
|
|
||||||
t1#P#part2#SP#sp21.ibd
|
|
||||||
t1#P#part2#SP#sp22.ibd
|
|
||||||
t1#P#part3#SP#sp31.ibd
|
|
||||||
t1#P#part3#SP#sp32.ibd
|
|
||||||
t1#P#part4#SP#sp41.ibd
|
|
||||||
t1#P#part4#SP#sp42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -27624,15 +27255,6 @@ SUBPARTITIONS 3
|
||||||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#part1sp0.ibd
|
|
||||||
t1#P#part1#SP#part1sp1.ibd
|
|
||||||
t1#P#part1#SP#part1sp2.ibd
|
|
||||||
t1#P#part2#SP#part2sp0.ibd
|
|
||||||
t1#P#part2#SP#part2sp1.ibd
|
|
||||||
t1#P#part2#SP#part2sp2.ibd
|
|
||||||
t1#P#part3#SP#part3sp0.ibd
|
|
||||||
t1#P#part3#SP#part3sp1.ibd
|
|
||||||
t1#P#part3#SP#part3sp2.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -28126,8 +27748,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 2 */
|
PARTITIONS 2 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -28636,11 +28256,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITIONS 5 */
|
PARTITIONS 5 */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#p0.ibd
|
|
||||||
t1#P#p1.ibd
|
|
||||||
t1#P#p2.ibd
|
|
||||||
t1#P#p3.ibd
|
|
||||||
t1#P#p4.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -29164,14 +28779,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part0.ibd
|
|
||||||
t1#P#part1.ibd
|
|
||||||
t1#P#part2.ibd
|
|
||||||
t1#P#part3.ibd
|
|
||||||
t1#P#part_1.ibd
|
|
||||||
t1#P#part_2.ibd
|
|
||||||
t1#P#part_3.ibd
|
|
||||||
t1#P#part_N.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -29691,12 +29298,6 @@ t1 CREATE TABLE `t1` (
|
||||||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta.ibd
|
|
||||||
t1#P#partb.ibd
|
|
||||||
t1#P#partc.ibd
|
|
||||||
t1#P#partd.ibd
|
|
||||||
t1#P#parte.ibd
|
|
||||||
t1#P#partf.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -30212,14 +29813,6 @@ SUBPARTITIONS 2
|
||||||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#parta#SP#partasp0.ibd
|
|
||||||
t1#P#parta#SP#partasp1.ibd
|
|
||||||
t1#P#partb#SP#partbsp0.ibd
|
|
||||||
t1#P#partb#SP#partbsp1.ibd
|
|
||||||
t1#P#partc#SP#partcsp0.ibd
|
|
||||||
t1#P#partc#SP#partcsp1.ibd
|
|
||||||
t1#P#partd#SP#partdsp0.ibd
|
|
||||||
t1#P#partd#SP#partdsp1.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -30746,14 +30339,6 @@ SUBPARTITION BY KEY (f_int2)
|
||||||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#subpart11.ibd
|
|
||||||
t1#P#part1#SP#subpart12.ibd
|
|
||||||
t1#P#part2#SP#subpart21.ibd
|
|
||||||
t1#P#part2#SP#subpart22.ibd
|
|
||||||
t1#P#part3#SP#subpart31.ibd
|
|
||||||
t1#P#part3#SP#subpart32.ibd
|
|
||||||
t1#P#part4#SP#subpart41.ibd
|
|
||||||
t1#P#part4#SP#subpart42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -31280,14 +30865,6 @@ SUBPARTITION BY HASH (f_int2 + 1)
|
||||||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#sp11.ibd
|
|
||||||
t1#P#part1#SP#sp12.ibd
|
|
||||||
t1#P#part2#SP#sp21.ibd
|
|
||||||
t1#P#part2#SP#sp22.ibd
|
|
||||||
t1#P#part3#SP#sp31.ibd
|
|
||||||
t1#P#part3#SP#sp32.ibd
|
|
||||||
t1#P#part4#SP#sp41.ibd
|
|
||||||
t1#P#part4#SP#sp42.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
@ -31804,15 +31381,6 @@ SUBPARTITIONS 3
|
||||||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||||
|
|
||||||
unified filelist
|
unified filelist
|
||||||
t1#P#part1#SP#part1sp0.ibd
|
|
||||||
t1#P#part1#SP#part1sp1.ibd
|
|
||||||
t1#P#part1#SP#part1sp2.ibd
|
|
||||||
t1#P#part2#SP#part2sp0.ibd
|
|
||||||
t1#P#part2#SP#part2sp1.ibd
|
|
||||||
t1#P#part2#SP#part2sp2.ibd
|
|
||||||
t1#P#part3#SP#part3sp0.ibd
|
|
||||||
t1#P#part3#SP#part3sp1.ibd
|
|
||||||
t1#P#part3#SP#part3sp2.ibd
|
|
||||||
t1.frm
|
t1.frm
|
||||||
t1.par
|
t1.par
|
||||||
|
|
||||||
|
|
|
@ -6,19 +6,19 @@ show status like 'Slave_heartbeat_period';;
|
||||||
Variable_name Slave_heartbeat_period
|
Variable_name Slave_heartbeat_period
|
||||||
Value 5.000
|
Value 5.000
|
||||||
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 4294968;
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 4294968;
|
||||||
ERROR HY000: The requested value for the heartbeat period is negative or exceeds the maximum 4294967 seconds
|
ERROR HY000: The requested value for the heartbeat period is either negative or exceeds the maximum allowed (4294967 seconds).
|
||||||
show status like 'Slave_heartbeat_period';;
|
show status like 'Slave_heartbeat_period';;
|
||||||
Variable_name Slave_heartbeat_period
|
Variable_name Slave_heartbeat_period
|
||||||
Value 5.000
|
Value 5.000
|
||||||
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 0.0009999;
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 0.0009999;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1624 The requested value for the heartbeat period is less than 1 msec. The period is reset to zero which means no heartbeats will be sending
|
Warning 1703 The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled.
|
||||||
show status like 'Slave_heartbeat_period';;
|
show status like 'Slave_heartbeat_period';;
|
||||||
Variable_name Slave_heartbeat_period
|
Variable_name Slave_heartbeat_period
|
||||||
Value 0.000
|
Value 0.000
|
||||||
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 4294967;
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 4294967;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1624 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout.
|
Warning 1704 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.
|
||||||
show status like 'Slave_heartbeat_period';;
|
show status like 'Slave_heartbeat_period';;
|
||||||
Variable_name Slave_heartbeat_period
|
Variable_name Slave_heartbeat_period
|
||||||
Value 4294967.000
|
Value 4294967.000
|
||||||
|
@ -30,7 +30,7 @@ reset slave;
|
||||||
set @@global.slave_net_timeout= 5;
|
set @@global.slave_net_timeout= 5;
|
||||||
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 5.001;
|
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 5.001;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1624 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout.
|
Warning 1704 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.
|
||||||
show status like 'Slave_heartbeat_period';;
|
show status like 'Slave_heartbeat_period';;
|
||||||
Variable_name Slave_heartbeat_period
|
Variable_name Slave_heartbeat_period
|
||||||
Value 5.001
|
Value 5.001
|
||||||
|
@ -42,7 +42,7 @@ Variable_name Slave_heartbeat_period
|
||||||
Value 4.000
|
Value 4.000
|
||||||
set @@global.slave_net_timeout= 3 /* must be a warning */;
|
set @@global.slave_net_timeout= 3 /* must be a warning */;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1624 The current value for master_heartbeat_period exceeds the new value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout.
|
Warning 1704 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.
|
||||||
reset slave;
|
reset slave;
|
||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
set @@global.slave_net_timeout= 10;
|
set @@global.slave_net_timeout= 10;
|
||||||
|
|
|
@ -38,14 +38,14 @@ RESET SLAVE;
|
||||||
*** Warning if updated slave_net_timeout < slave_heartbeat_timeout ***
|
*** Warning if updated slave_net_timeout < slave_heartbeat_timeout ***
|
||||||
SET @@global.slave_net_timeout=FLOOR(SLAVE_HEARTBEAT_TIMEOUT)-1;
|
SET @@global.slave_net_timeout=FLOOR(SLAVE_HEARTBEAT_TIMEOUT)-1;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1624 The current value for master_heartbeat_period exceeds the new value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout.
|
Warning 1704 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.
|
||||||
SET @@global.slave_net_timeout=@restore_slave_net_timeout;
|
SET @@global.slave_net_timeout=@restore_slave_net_timeout;
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
*** Warning if updated slave_heartbeat_timeout > slave_net_timeout ***
|
*** Warning if updated slave_heartbeat_timeout > slave_net_timeout ***
|
||||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=SLAVE_NET_TIMEOUT;
|
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=SLAVE_NET_TIMEOUT;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1624 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout.
|
Warning 1704 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
*** CHANGE MASTER statement only updates slave_heartbeat_period ***
|
*** CHANGE MASTER statement only updates slave_heartbeat_period ***
|
||||||
|
@ -140,7 +140,7 @@ Slave_heartbeat_period 0.001
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.0009;
|
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.0009;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1624 The requested value for the heartbeat period is less than 1 msec. The period is reset to zero which means no heartbeats will be sending
|
Warning 1703 The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled.
|
||||||
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
|
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Slave_heartbeat_period 0.000
|
Slave_heartbeat_period 0.000
|
||||||
|
@ -149,19 +149,19 @@ RESET SLAVE;
|
||||||
*** Max slave_heartbeat_timeout ***
|
*** Max slave_heartbeat_timeout ***
|
||||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967;
|
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1624 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' sec. A sensible value for the period should be less than the timeout.
|
Warning 1704 The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout.
|
||||||
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
|
SHOW GLOBAL STATUS LIKE 'slave_heartbeat_period';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Slave_heartbeat_period 4294967.000
|
Slave_heartbeat_period 4294967.000
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294968;
|
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294968;
|
||||||
ERROR HY000: The requested value for the heartbeat period is negative or exceeds the maximum 4294967 seconds
|
ERROR HY000: The requested value for the heartbeat period is either negative or exceeds the maximum allowed (4294967 seconds).
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=8589935;
|
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=8589935;
|
||||||
ERROR HY000: The requested value for the heartbeat period is negative or exceeds the maximum 4294967 seconds
|
ERROR HY000: The requested value for the heartbeat period is either negative or exceeds the maximum allowed (4294967 seconds).
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967296;
|
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967296;
|
||||||
ERROR HY000: The requested value for the heartbeat period is negative or exceeds the maximum 4294967 seconds
|
ERROR HY000: The requested value for the heartbeat period is either negative or exceeds the maximum allowed (4294967 seconds).
|
||||||
RESET SLAVE;
|
RESET SLAVE;
|
||||||
|
|
||||||
*** Misc incorrect values ***
|
*** Misc incorrect values ***
|
||||||
|
|
|
@ -5,6 +5,8 @@ reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||||
|
SET GLOBAL max_binlog_cache_size = 4096;
|
||||||
|
SET GLOBAL binlog_cache_size = 4096;
|
||||||
CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
||||||
CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
|
CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
|
||||||
CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
||||||
|
@ -15,13 +17,14 @@ CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
*** Single statement on non-transactional table ***
|
*** Single statement on non-transactional table ***
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
START SLAVE SQL_THREAD;
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||||
|
include/start_slave.inc
|
||||||
*** Single statement on both transactional and non-transactional tables. ***
|
*** Single statement on both transactional and non-transactional tables. ***
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
START SLAVE SQL_THREAD;
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1;
|
||||||
source include/diff_master_slave.inc;
|
include/start_slave.inc
|
||||||
########################################################################################
|
########################################################################################
|
||||||
# 2 - BEGIN - IMPLICIT COMMIT by DDL
|
# 2 - BEGIN - IMPLICIT COMMIT by DDL
|
||||||
########################################################################################
|
########################################################################################
|
||||||
|
@ -119,6 +122,35 @@ BEGIN;
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
COMMIT;
|
COMMIT;
|
||||||
source include/diff_master_slave.inc;
|
source include/diff_master_slave.inc;
|
||||||
|
########################################################################
|
||||||
|
# 8 - Bug#55375(Regression Bug) Transaction bigger than
|
||||||
|
# max_binlog_cache_size crashes slave
|
||||||
|
########################################################################
|
||||||
|
# [ On Slave ]
|
||||||
|
SET GLOBAL max_binlog_cache_size = 4096;
|
||||||
|
SET GLOBAL binlog_cache_size = 4096;
|
||||||
|
include/stop_slave.inc
|
||||||
|
include/start_slave.inc
|
||||||
|
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
|
||||||
|
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
|
||||||
|
TRUNCATE t1;
|
||||||
|
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
|
||||||
|
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
|
||||||
|
BEGIN;
|
||||||
|
Repeat statement 'INSERT INTO t1 VALUES($n, repeat("a", 32))' 128 times
|
||||||
|
COMMIT;
|
||||||
|
SELECT count(*) FROM t1;
|
||||||
|
count(*)
|
||||||
|
0
|
||||||
|
show binlog events in 'slave-bin.000001' from <binlog_start>;
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
|
||||||
|
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
|
||||||
|
include/stop_slave.inc
|
||||||
|
include/start_slave.inc
|
||||||
|
SELECT count(*) FROM t1;
|
||||||
|
count(*)
|
||||||
|
128
|
||||||
########################################################################################
|
########################################################################################
|
||||||
# CLEAN
|
# CLEAN
|
||||||
########################################################################################
|
########################################################################################
|
||||||
|
|
|
@ -5,6 +5,8 @@ reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||||
|
SET GLOBAL max_binlog_cache_size = 4096;
|
||||||
|
SET GLOBAL binlog_cache_size = 4096;
|
||||||
CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
||||||
CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
|
CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
|
||||||
CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
||||||
|
@ -15,13 +17,14 @@ CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
*** Single statement on non-transactional table ***
|
*** Single statement on non-transactional table ***
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
START SLAVE SQL_THREAD;
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||||
|
include/start_slave.inc
|
||||||
*** Single statement on both transactional and non-transactional tables. ***
|
*** Single statement on both transactional and non-transactional tables. ***
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 2;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
START SLAVE SQL_THREAD;
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||||
source include/diff_master_slave.inc;
|
include/start_slave.inc
|
||||||
########################################################################################
|
########################################################################################
|
||||||
# 2 - BEGIN - IMPLICIT COMMIT by DDL
|
# 2 - BEGIN - IMPLICIT COMMIT by DDL
|
||||||
########################################################################################
|
########################################################################################
|
||||||
|
@ -39,8 +42,6 @@ Got one of the listed errors
|
||||||
BEGIN;
|
BEGIN;
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
|
||||||
START SLAVE SQL_THREAD;
|
|
||||||
source include/diff_master_slave.inc;
|
source include/diff_master_slave.inc;
|
||||||
########################################################################################
|
########################################################################################
|
||||||
# 3 - BEGIN - COMMIT
|
# 3 - BEGIN - COMMIT
|
||||||
|
@ -122,6 +123,35 @@ BEGIN;
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
COMMIT;
|
COMMIT;
|
||||||
source include/diff_master_slave.inc;
|
source include/diff_master_slave.inc;
|
||||||
|
########################################################################
|
||||||
|
# 8 - Bug#55375(Regression Bug) Transaction bigger than
|
||||||
|
# max_binlog_cache_size crashes slave
|
||||||
|
########################################################################
|
||||||
|
# [ On Slave ]
|
||||||
|
SET GLOBAL max_binlog_cache_size = 4096;
|
||||||
|
SET GLOBAL binlog_cache_size = 4096;
|
||||||
|
include/stop_slave.inc
|
||||||
|
include/start_slave.inc
|
||||||
|
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
|
||||||
|
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
|
||||||
|
TRUNCATE t1;
|
||||||
|
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
|
||||||
|
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
|
||||||
|
BEGIN;
|
||||||
|
Repeat statement 'INSERT INTO t1 VALUES($n, repeat("a", 32))' 128 times
|
||||||
|
COMMIT;
|
||||||
|
SELECT count(*) FROM t1;
|
||||||
|
count(*)
|
||||||
|
0
|
||||||
|
show binlog events in 'slave-bin.000001' from <binlog_start>;
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
|
||||||
|
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
|
||||||
|
include/stop_slave.inc
|
||||||
|
include/start_slave.inc
|
||||||
|
SELECT count(*) FROM t1;
|
||||||
|
count(*)
|
||||||
|
128
|
||||||
########################################################################################
|
########################################################################################
|
||||||
# CLEAN
|
# CLEAN
|
||||||
########################################################################################
|
########################################################################################
|
||||||
|
|
|
@ -5,6 +5,8 @@ reset slave;
|
||||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
start slave;
|
start slave;
|
||||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||||
|
SET GLOBAL max_binlog_cache_size = 4096;
|
||||||
|
SET GLOBAL binlog_cache_size = 4096;
|
||||||
CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
||||||
CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
|
CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
|
||||||
CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
||||||
|
@ -15,13 +17,14 @@ CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
*** Single statement on non-transactional table ***
|
*** Single statement on non-transactional table ***
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
START SLAVE SQL_THREAD;
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||||
|
include/start_slave.inc
|
||||||
*** Single statement on both transactional and non-transactional tables. ***
|
*** Single statement on both transactional and non-transactional tables. ***
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||||
START SLAVE SQL_THREAD;
|
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1;
|
||||||
source include/diff_master_slave.inc;
|
include/start_slave.inc
|
||||||
########################################################################################
|
########################################################################################
|
||||||
# 2 - BEGIN - IMPLICIT COMMIT by DDL
|
# 2 - BEGIN - IMPLICIT COMMIT by DDL
|
||||||
########################################################################################
|
########################################################################################
|
||||||
|
@ -119,6 +122,35 @@ BEGIN;
|
||||||
Got one of the listed errors
|
Got one of the listed errors
|
||||||
COMMIT;
|
COMMIT;
|
||||||
source include/diff_master_slave.inc;
|
source include/diff_master_slave.inc;
|
||||||
|
########################################################################
|
||||||
|
# 8 - Bug#55375(Regression Bug) Transaction bigger than
|
||||||
|
# max_binlog_cache_size crashes slave
|
||||||
|
########################################################################
|
||||||
|
# [ On Slave ]
|
||||||
|
SET GLOBAL max_binlog_cache_size = 4096;
|
||||||
|
SET GLOBAL binlog_cache_size = 4096;
|
||||||
|
include/stop_slave.inc
|
||||||
|
include/start_slave.inc
|
||||||
|
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
|
||||||
|
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
|
||||||
|
TRUNCATE t1;
|
||||||
|
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
|
||||||
|
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
|
||||||
|
BEGIN;
|
||||||
|
Repeat statement 'INSERT INTO t1 VALUES($n, repeat("a", 32))' 128 times
|
||||||
|
COMMIT;
|
||||||
|
SELECT count(*) FROM t1;
|
||||||
|
count(*)
|
||||||
|
0
|
||||||
|
show binlog events in 'slave-bin.000001' from <binlog_start>;
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
|
||||||
|
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
|
||||||
|
include/stop_slave.inc
|
||||||
|
include/start_slave.inc
|
||||||
|
SELECT count(*) FROM t1;
|
||||||
|
count(*)
|
||||||
|
128
|
||||||
########################################################################################
|
########################################################################################
|
||||||
# CLEAN
|
# CLEAN
|
||||||
########################################################################################
|
########################################################################################
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
--binlog_cache_size=4096 --max_binlog_cache_size=7680
|
|
|
@ -1 +0,0 @@
|
||||||
--binlog_cache_size=4096 --max_binlog_cache_size=7680 --default-storage-engine=MyISAM
|
|
|
@ -1 +0,0 @@
|
||||||
--binlog_cache_size=4096 --max_binlog_cache_size=7680
|
|
|
@ -26,7 +26,7 @@ INSERT INTO t2 values (20,22);
|
||||||
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`b`) REFERENCES `t1` (`a`))
|
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`b`) REFERENCES `t1` (`a`))
|
||||||
'---Check when foreign_key_checks is disabled---'
|
'---Check when foreign_key_checks is disabled---'
|
||||||
TRUNCATE t1;
|
TRUNCATE t1;
|
||||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`b`) REFERENCES `t1` (`a`))
|
ERROR 42000: Cannot truncate a table referenced in a foreign key constraint (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`b`) REFERENCES `test`.`t1` (`a`))
|
||||||
SET @@session.foreign_key_checks = 0;
|
SET @@session.foreign_key_checks = 0;
|
||||||
TRUNCATE t1;
|
TRUNCATE t1;
|
||||||
TRUNCATE t2;
|
TRUNCATE t2;
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
SET @start_global_value = @@global.innodb_file_format;
|
SET @start_global_value = @@global.innodb_file_format;
|
||||||
SELECT @start_global_value;
|
SELECT @start_global_value;
|
||||||
@start_global_value
|
@start_global_value
|
||||||
Barracuda
|
Antelope
|
||||||
Valid values are 'Antelope' and 'Barracuda'
|
Valid values are 'Antelope' and 'Barracuda'
|
||||||
select @@global.innodb_file_format in ('Antelope', 'Barracuda');
|
select @@global.innodb_file_format in ('Antelope', 'Barracuda');
|
||||||
@@global.innodb_file_format in ('Antelope', 'Barracuda')
|
@@global.innodb_file_format in ('Antelope', 'Barracuda')
|
||||||
1
|
1
|
||||||
select @@global.innodb_file_format;
|
select @@global.innodb_file_format;
|
||||||
@@global.innodb_file_format
|
@@global.innodb_file_format
|
||||||
Barracuda
|
Antelope
|
||||||
select @@session.innodb_file_format;
|
select @@session.innodb_file_format;
|
||||||
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable
|
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable
|
||||||
show global variables like 'innodb_file_format';
|
show global variables like 'innodb_file_format';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
innodb_file_format Barracuda
|
innodb_file_format Antelope
|
||||||
show session variables like 'innodb_file_format';
|
show session variables like 'innodb_file_format';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
innodb_file_format Barracuda
|
innodb_file_format Antelope
|
||||||
select * from information_schema.global_variables where variable_name='innodb_file_format';
|
select * from information_schema.global_variables where variable_name='innodb_file_format';
|
||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
INNODB_FILE_FORMAT Barracuda
|
INNODB_FILE_FORMAT Antelope
|
||||||
select * from information_schema.session_variables where variable_name='innodb_file_format';
|
select * from information_schema.session_variables where variable_name='innodb_file_format';
|
||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
INNODB_FILE_FORMAT Barracuda
|
INNODB_FILE_FORMAT Antelope
|
||||||
set global innodb_file_format='Antelope';
|
set global innodb_file_format='Antelope';
|
||||||
select @@global.innodb_file_format;
|
select @@global.innodb_file_format;
|
||||||
@@global.innodb_file_format
|
@@global.innodb_file_format
|
||||||
|
@ -56,4 +56,4 @@ ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Salmon'
|
||||||
SET @@global.innodb_file_format = @start_global_value;
|
SET @@global.innodb_file_format = @start_global_value;
|
||||||
SELECT @@global.innodb_file_format;
|
SELECT @@global.innodb_file_format;
|
||||||
@@global.innodb_file_format
|
@@global.innodb_file_format
|
||||||
Barracuda
|
Antelope
|
||||||
|
|
|
@ -76,7 +76,7 @@ INSERT INTO t2 values (20,22);
|
||||||
--echo '---Check when foreign_key_checks is disabled---'
|
--echo '---Check when foreign_key_checks is disabled---'
|
||||||
#===========================================================
|
#===========================================================
|
||||||
|
|
||||||
--Error ER_ROW_IS_REFERENCED_2
|
--Error ER_TRUNCATE_ILLEGAL_FK
|
||||||
TRUNCATE t1;
|
TRUNCATE t1;
|
||||||
|
|
||||||
SET @@session.foreign_key_checks = 0;
|
SET @@session.foreign_key_checks = 0;
|
||||||
|
|
|
@ -14,3 +14,18 @@ let $engine_type= InnoDB;
|
||||||
let $test_foreign_keys= 1;
|
let $test_foreign_keys= 1;
|
||||||
|
|
||||||
--source include/query_cache.inc
|
--source include/query_cache.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#56452 Assertion failed: thd->transaction.stmt.is_empty() ||
|
||||||
|
# thd->in_sub_stmt
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
BEGIN;
|
||||||
|
INSERT INTO t1 VALUES(1);
|
||||||
|
ROLLBACK WORK AND CHAIN NO RELEASE;
|
||||||
|
SELECT a FROM t1;
|
||||||
|
ROLLBACK WORK AND CHAIN NO RELEASE;
|
||||||
|
SELECT a FROM t1;
|
||||||
|
ROLLBACK;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
|
@ -554,3 +554,29 @@ DELETE FROM t1.*, test.t2.*, a.* USING t1, t2, t3 AS a;
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#51099 Assertion in mysql_multi_delete_prepare()
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1, t2;
|
||||||
|
DROP VIEW IF EXISTS v1, v2;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
CREATE TABLE t1(a INT);
|
||||||
|
CREATE TABLE t2(b INT);
|
||||||
|
CREATE VIEW v1 AS SELECT a, b FROM t1, t2;
|
||||||
|
CREATE VIEW v2 AS SELECT a FROM v1;
|
||||||
|
|
||||||
|
# This is a normal delete
|
||||||
|
--error ER_VIEW_DELETE_MERGE_VIEW
|
||||||
|
DELETE FROM v2;
|
||||||
|
# This is a multi table delete, check that we get the same error
|
||||||
|
# This caused the assertion.
|
||||||
|
--error ER_VIEW_DELETE_MERGE_VIEW
|
||||||
|
DELETE v2 FROM v2;
|
||||||
|
|
||||||
|
DROP VIEW v2, v1;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
|
@ -13,7 +13,6 @@ kill : Bug#37780 2008-12-03 HHunger need some changes to be
|
||||||
lowercase_table3 : Bug#54845 2010-06-30 alik main.lowercase_table3 on Mac OSX
|
lowercase_table3 : Bug#54845 2010-06-30 alik main.lowercase_table3 on Mac OSX
|
||||||
mysqlhotcopy_myisam : Bug#54129 2010-08-31 alik mysqlhotcopy* fails
|
mysqlhotcopy_myisam : Bug#54129 2010-08-31 alik mysqlhotcopy* fails
|
||||||
mysqlhotcopy_archive : Bug#54129 2010-08-31 alik mysqlhotcopy* fails
|
mysqlhotcopy_archive : Bug#54129 2010-08-31 alik mysqlhotcopy* fails
|
||||||
partition_innodb_plugin : Bug#53307 2010-04-30 VasilDimov valgrind warnings
|
|
||||||
query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
|
query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
|
||||||
sp_sync : Bug#48157 2010-02-06 5.5-m3 demands a differnt solution
|
sp_sync : Bug#48157 2010-02-06 5.5-m3 demands a differnt solution
|
||||||
ctype_utf8mb4_ndb : Bug#55799, Bug#51907, disabled by Konstantin 2010-08-06
|
ctype_utf8mb4_ndb : Bug#55799, Bug#51907, disabled by Konstantin 2010-08-06
|
||||||
|
|
|
@ -458,3 +458,9 @@ SELECT 2 DIV -2;
|
||||||
SELECT -(1 DIV 0);
|
SELECT -(1 DIV 0);
|
||||||
# Crashed the server with SIGFPE before the bugfix
|
# Crashed the server with SIGFPE before the bugfix
|
||||||
SELECT -9223372036854775808 MOD -1;
|
SELECT -9223372036854775808 MOD -1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #57209 valgrind + Assertion failed: dst > buf
|
||||||
|
--echo #
|
||||||
|
SELECT floor(log10(format(concat_ws(5445796E25, 5306463, 30837), -358821)))
|
||||||
|
as foo;
|
||||||
|
|
|
@ -833,3 +833,14 @@ SELECT 1 FROM t1 ORDER BY @x:=makedate(a,a);
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#57039: constant subtime expression returns incorrect result.
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (`date_date` datetime NOT NULL);
|
||||||
|
INSERT INTO t1 VALUES ('2008-01-03 00:00:00'), ('2008-01-03 00:00:00');
|
||||||
|
SELECT * FROM t1 WHERE date_date >= subtime(now(), "00:30:00");
|
||||||
|
SELECT * FROM t1 WHERE date_date <= addtime(date_add("2000-1-1", INTERVAL "1:1:1" HOUR_SECOND), "00:20:00");
|
||||||
|
DROP TABLE t1;
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
|
|
@ -3969,7 +3969,8 @@ INSERT INTO t1 VALUES (1),(2),(3);
|
||||||
|
|
||||||
--echo # Connection: con1
|
--echo # Connection: con1
|
||||||
connection con1;
|
connection con1;
|
||||||
SET debug_sync='lock_table_for_truncate SIGNAL parked_truncate WAIT_FOR go_truncate';
|
LOCK TABLES t1 WRITE;
|
||||||
|
SET debug_sync='upgrade_lock_for_truncate SIGNAL parked_truncate WAIT_FOR go_truncate';
|
||||||
send TRUNCATE TABLE t1;
|
send TRUNCATE TABLE t1;
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
|
@ -3994,15 +3995,17 @@ connection default;
|
||||||
--echo # Connection: default
|
--echo # Connection: default
|
||||||
SET debug_sync='now WAIT_FOR parked_flush';
|
SET debug_sync='now WAIT_FOR parked_flush';
|
||||||
SET debug_sync='now SIGNAL go_truncate';
|
SET debug_sync='now SIGNAL go_truncate';
|
||||||
|
--echo # Ensure that truncate waits for a exclusive lock
|
||||||
|
let $wait_condition=SELECT COUNT(*)=1 FROM information_schema.processlist
|
||||||
|
WHERE state='Waiting for table metadata lock' AND info='TRUNCATE TABLE t1';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
SET debug_sync= 'now SIGNAL go_show';
|
||||||
|
|
||||||
connection con1;
|
connection con1;
|
||||||
--echo # Connection: con1
|
--echo # Connection: con1 (TRUNCATE)
|
||||||
--echo # Reaping...
|
--echo # Reaping...
|
||||||
reap;
|
reap;
|
||||||
|
UNLOCK TABLES;
|
||||||
connection default;
|
|
||||||
--echo # Connection: default
|
|
||||||
SET debug_sync= 'now SIGNAL go_show';
|
|
||||||
|
|
||||||
connection con2;
|
connection con2;
|
||||||
--echo # Connection: con2 (SHOW FIELDS FROM t1)
|
--echo # Connection: con2 (SHOW FIELDS FROM t1)
|
||||||
|
|
|
@ -2600,11 +2600,12 @@ UNLOCK TABLES;
|
||||||
DROP TABLE m1, t1;
|
DROP TABLE m1, t1;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Locking the merge table will implicitly lock children.
|
--echo # Locking the merge table won't implicitly lock children.
|
||||||
--echo #
|
--echo #
|
||||||
CREATE TABLE t1 (c1 INT);
|
CREATE TABLE t1 (c1 INT);
|
||||||
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1);
|
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1);
|
||||||
LOCK TABLE m1 WRITE;
|
LOCK TABLE m1 WRITE;
|
||||||
|
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
||||||
ALTER TABLE t1 ADD INDEX (c1);
|
ALTER TABLE t1 ADD INDEX (c1);
|
||||||
LOCK TABLE m1 WRITE, t1 WRITE;
|
LOCK TABLE m1 WRITE, t1 WRITE;
|
||||||
ALTER TABLE t1 ADD INDEX (c1);
|
ALTER TABLE t1 ADD INDEX (c1);
|
||||||
|
@ -2776,6 +2777,27 @@ REPAIR TABLE t2 USE_FRM;
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#57002 Assert in upgrade_shared_lock_to_exclusive()
|
||||||
|
--echo # for ALTER TABLE + MERGE tables
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1, m1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
CREATE TABLE t1(a INT) engine=myisam;
|
||||||
|
CREATE TABLE m1(a INT) engine=merge UNION(t1);
|
||||||
|
LOCK TABLES t1 READ, m1 WRITE;
|
||||||
|
|
||||||
|
# This caused an assert
|
||||||
|
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
||||||
|
ALTER TABLE t1 engine=myisam;
|
||||||
|
|
||||||
|
UNLOCK TABLES;
|
||||||
|
DROP TABLE m1, t1;
|
||||||
|
|
||||||
|
|
||||||
--echo End of 6.0 tests
|
--echo End of 6.0 tests
|
||||||
|
|
||||||
--disable_result_log
|
--disable_result_log
|
||||||
|
|
|
@ -23,10 +23,13 @@ drop database if exists client_test_db;
|
||||||
# Bug #13783 mysqlcheck tries to optimize and analyze information_schema
|
# Bug #13783 mysqlcheck tries to optimize and analyze information_schema
|
||||||
#
|
#
|
||||||
--replace_result 'Table is already up to date' OK
|
--replace_result 'Table is already up to date' OK
|
||||||
--exec $MYSQL_CHECK --all-databases --analyze --optimize
|
--exec $MYSQL_CHECK --all-databases --analyze
|
||||||
|
--exec $MYSQL_CHECK --all-databases --optimize
|
||||||
--replace_result 'Table is already up to date' OK
|
--replace_result 'Table is already up to date' OK
|
||||||
--exec $MYSQL_CHECK --analyze --optimize --databases test information_schema mysql
|
--exec $MYSQL_CHECK --analyze --databases test information_schema mysql
|
||||||
--exec $MYSQL_CHECK --analyze --optimize information_schema schemata
|
--exec $MYSQL_CHECK --optimize --databases test information_schema mysql
|
||||||
|
--exec $MYSQL_CHECK --analyze information_schema schemata
|
||||||
|
--exec $MYSQL_CHECK --optimize information_schema schemata
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #16502: mysqlcheck tries to check views
|
# Bug #16502: mysqlcheck tries to check views
|
||||||
|
@ -34,9 +37,11 @@ drop database if exists client_test_db;
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
create view v1 as select * from t1;
|
create view v1 as select * from t1;
|
||||||
--replace_result 'Table is already up to date' OK
|
--replace_result 'Table is already up to date' OK
|
||||||
--exec $MYSQL_CHECK --analyze --optimize --databases test
|
--exec $MYSQL_CHECK --analyze --databases test
|
||||||
|
--exec $MYSQL_CHECK --optimize --databases test
|
||||||
--replace_result 'Table is already up to date' OK
|
--replace_result 'Table is already up to date' OK
|
||||||
--exec $MYSQL_CHECK --all-in-1 --analyze --optimize --databases test
|
--exec $MYSQL_CHECK --all-in-1 --analyze --databases test
|
||||||
|
--exec $MYSQL_CHECK --all-in-1 --optimize --databases test
|
||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
@ -113,7 +118,8 @@ show tables;
|
||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||||
--copy_file $MYSQLD_DATADIR/test/v1.frm $MYSQLD_DATADIR/test/v-1.frm
|
--copy_file $MYSQLD_DATADIR/test/v1.frm $MYSQLD_DATADIR/test/v-1.frm
|
||||||
show tables;
|
show tables;
|
||||||
--exec $MYSQL_CHECK --check-upgrade --fix-table-names --databases test
|
--exec $MYSQL_CHECK --check-upgrade --databases test
|
||||||
|
--exec $MYSQL_CHECK --fix-table-names --databases test
|
||||||
show tables;
|
show tables;
|
||||||
drop view v1, `v-1`;
|
drop view v1, `v-1`;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -212,3 +218,14 @@ show tables like 't1-1';
|
||||||
drop table `t1-1`;
|
drop table `t1-1`;
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #35269: mysqlcheck behaves different depending on order of parameters
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--error 13
|
||||||
|
--exec $MYSQL_CHECK -a --fix-table-names test "#mysql50#t1-1"
|
||||||
|
--error 1
|
||||||
|
--exec $MYSQL_CHECK -aoc test "#mysql50#t1-1"
|
||||||
|
|
||||||
|
|
3
mysql-test/t/plugin_load_option-master.opt
Normal file
3
mysql-test/t/plugin_load_option-master.opt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
$EXAMPLE_PLUGIN_OPT
|
||||||
|
$EXAMPLE_PLUGIN_LOAD
|
||||||
|
--loose-plugin-example=FORCE_PLUS_PERMANENT
|
8
mysql-test/t/plugin_load_option.test
Normal file
8
mysql-test/t/plugin_load_option.test
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
--source include/not_windows_embedded.inc
|
||||||
|
--source include/have_example_plugin.inc
|
||||||
|
|
||||||
|
--error ER_PLUGIN_IS_PERMANENT
|
||||||
|
UNINSTALL PLUGIN example;
|
||||||
|
|
||||||
|
SELECT PLUGIN_NAME, PLUGIN_STATUS, LOAD_OPTION FROM INFORMATION_SCHEMA.PLUGINS
|
||||||
|
WHERE PLUGIN_NAME IN ('MyISAM', 'EXAMPLE');
|
|
@ -1,6 +1,6 @@
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
--source include/have_query_cache.inc
|
--source include/have_query_cache.inc
|
||||||
--source include/have_debug.inc
|
--source include/have_debug_sync.inc
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #30887 Server crashes on SET GLOBAL query_cache_size=0
|
# Bug #30887 Server crashes on SET GLOBAL query_cache_size=0
|
||||||
|
@ -18,12 +18,11 @@ connect (bug30887con2, localhost, root, ,test);
|
||||||
|
|
||||||
connection bug30887con1;
|
connection bug30887con1;
|
||||||
--echo Activate debug hook and attempt to retrieve the statement from the cache.
|
--echo Activate debug hook and attempt to retrieve the statement from the cache.
|
||||||
set session debug='+d,wait_in_query_cache_insert';
|
set debug_sync="wait_in_query_cache_insert SIGNAL parked WAIT_FOR go";
|
||||||
--send select SQL_CACHE * from t1;
|
--send select SQL_CACHE * from t1;
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
let $wait_condition= select count(*)= 1 from information_schema.processlist where state= 'wait_in_query_cache_insert';
|
set debug_sync="now WAIT_FOR parked";
|
||||||
--source include/wait_condition.inc
|
|
||||||
|
|
||||||
connection bug30887con2;
|
connection bug30887con2;
|
||||||
--echo On a second connection; clear the query cache.
|
--echo On a second connection; clear the query cache.
|
||||||
|
@ -32,14 +31,18 @@ set global query_cache_size= 0;
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
--echo Signal the debug hook to release the lock.
|
--echo Signal the debug hook to release the lock.
|
||||||
select id from information_schema.processlist where state='wait_in_query_cache_insert' into @thread_id;
|
set debug_sync="now SIGNAL go";
|
||||||
kill query @thread_id;
|
|
||||||
|
|
||||||
--echo Show query cache status.
|
--echo Show query cache status.
|
||||||
show status like 'Qcache_queries_in_cache';
|
show status like 'Qcache_queries_in_cache';
|
||||||
|
|
||||||
|
connection bug30887con1;
|
||||||
|
--reap
|
||||||
|
|
||||||
disconnect bug30887con1;
|
disconnect bug30887con1;
|
||||||
disconnect bug30887con2;
|
disconnect bug30887con2;
|
||||||
|
connection default;
|
||||||
|
set debug_sync= 'RESET';
|
||||||
set global query_cache_size= 0;
|
set global query_cache_size= 0;
|
||||||
use test;
|
use test;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
@ -67,18 +70,14 @@ connect(con2,localhost,root,,test,,);
|
||||||
|
|
||||||
connection con1;
|
connection con1;
|
||||||
--echo # Switch to connection con1
|
--echo # Switch to connection con1
|
||||||
SET SESSION debug='+d,wait_after_query_cache_invalidate';
|
SET DEBUG_SYNC = "wait_after_query_cache_invalidate SIGNAL parked WAIT_FOR go";
|
||||||
--echo # Send concurrent insert, will wait in the query cache table invalidate
|
--echo # Send concurrent insert, will wait in the query cache table invalidate
|
||||||
--send INSERT INTO t1 VALUES (4)
|
--send INSERT INTO t1 VALUES (4)
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
--echo # Switch to connection default
|
--echo # Switch to connection default
|
||||||
--echo # Wait for concurrent insert to reach the debug point
|
--echo # Wait for concurrent insert to reach the debug point
|
||||||
let $wait_condition=
|
SET DEBUG_SYNC = "now WAIT_FOR parked";
|
||||||
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST
|
|
||||||
WHERE STATE = "wait_after_query_cache_invalidate" AND
|
|
||||||
INFO = "INSERT INTO t1 VALUES (4)";
|
|
||||||
--source include/wait_condition.inc
|
|
||||||
|
|
||||||
connection con2;
|
connection con2;
|
||||||
--echo # Switch to connection con2
|
--echo # Switch to connection con2
|
||||||
|
@ -88,9 +87,7 @@ SELECT * FROM t1;
|
||||||
connection default;
|
connection default;
|
||||||
--echo # Switch to connection default
|
--echo # Switch to connection default
|
||||||
--echo # Notify the concurrent insert to proceed
|
--echo # Notify the concurrent insert to proceed
|
||||||
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
|
SET DEBUG_SYNC = "now SIGNAL go";
|
||||||
WHERE STATE = 'wait_after_query_cache_invalidate' INTO @thread_id;
|
|
||||||
KILL QUERY @thread_id;
|
|
||||||
|
|
||||||
connection con1;
|
connection con1;
|
||||||
--echo # Switch to connection con1
|
--echo # Switch to connection con1
|
||||||
|
@ -107,6 +104,7 @@ disconnect con2;
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
--echo # Restore defaults
|
--echo # Restore defaults
|
||||||
|
SET DEBUG_SYNC= 'RESET';
|
||||||
RESET QUERY CACHE;
|
RESET QUERY CACHE;
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
SET GLOBAL concurrent_insert= DEFAULT;
|
SET GLOBAL concurrent_insert= DEFAULT;
|
||||||
|
@ -157,15 +155,14 @@ SELECT SQL_CACHE * FROM t1;
|
||||||
--echo ** before the mutex lock in invalidate_table_internal.
|
--echo ** before the mutex lock in invalidate_table_internal.
|
||||||
--echo ** This will allow new result sets to be written into the QC.
|
--echo ** This will allow new result sets to be written into the QC.
|
||||||
--echo **
|
--echo **
|
||||||
SET SESSION debug='+d,wait_in_query_cache_invalidate1';
|
SET DEBUG_SYNC="wait_in_query_cache_invalidate1 SIGNAL parked1_1 WAIT_FOR go1_1";
|
||||||
SET SESSION debug='+d,wait_in_query_cache_invalidate2';
|
SET DEBUG_SYNC="wait_in_query_cache_invalidate2 SIGNAL parked1_2 WAIT_FOR go1_2";
|
||||||
--send DELETE FROM t1 WHERE a like '%a%';
|
--send DELETE FROM t1 WHERE a like '%a%';
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
--echo =================================== Connection default
|
--echo =================================== Connection default
|
||||||
--echo ** Assert that the expect process status is obtained.
|
--echo ** Assert that the expect process status is obtained.
|
||||||
LET $wait_condition= SELECT SQL_NO_CACHE COUNT(*)= 1 FROM information_schema.processlist WHERE state= 'wait_in_query_cache_invalidate1';
|
SET DEBUG_SYNC="now WAIT_FOR parked1_1";
|
||||||
--source include/wait_condition.inc
|
|
||||||
-- echo **
|
-- echo **
|
||||||
|
|
||||||
connection thd2;
|
connection thd2;
|
||||||
|
@ -173,32 +170,36 @@ connection thd2;
|
||||||
--echo ** On THD2: Insert a result into the cache. This attempt will be blocked
|
--echo ** On THD2: Insert a result into the cache. This attempt will be blocked
|
||||||
--echo ** because of a debug hook placed just before the mutex lock after which
|
--echo ** because of a debug hook placed just before the mutex lock after which
|
||||||
--echo ** the first part of the result set is written.
|
--echo ** the first part of the result set is written.
|
||||||
SET SESSION debug='+d,wait_in_query_cache_insert';
|
SET DEBUG_SYNC="wait_in_query_cache_insert SIGNAL parked2 WAIT_FOR go2 EXECUTE 1";
|
||||||
--send SELECT SQL_CACHE * FROM t2 UNION SELECT * FROM t3
|
--send SELECT SQL_CACHE * FROM t2 UNION SELECT * FROM t3
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
--echo =================================== Connection default
|
||||||
|
--echo ** Assert that the SELECT-stmt thread reaches the sync point.
|
||||||
|
SET DEBUG_SYNC="now WAIT_FOR parked2";
|
||||||
|
--echo **
|
||||||
|
--echo **
|
||||||
|
|
||||||
connection thd3;
|
connection thd3;
|
||||||
--echo =================================== Connection thd3
|
--echo =================================== Connection thd3
|
||||||
--echo ** On THD3: Insert another result into the cache and block on the same
|
--echo ** On THD3: Insert another result into the cache and block on the same
|
||||||
--echo ** debug hook.
|
--echo ** debug hook.
|
||||||
SET SESSION debug='+d,wait_in_query_cache_insert';
|
SET DEBUG_SYNC="wait_in_query_cache_insert SIGNAL parked3 WAIT_FOR go3 EXECUTE 1";
|
||||||
--send SELECT SQL_CACHE * FROM t4 UNION SELECT * FROM t5;
|
--send SELECT SQL_CACHE * FROM t4 UNION SELECT * FROM t5
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
--echo =================================== Connection default
|
--echo =================================== Connection default
|
||||||
--echo ** Assert that the two SELECT-stmt threads to reach the hook.
|
--echo ** Assert that the SELECT-stmt thread reaches the sync point.
|
||||||
LET $wait_condition= SELECT SQL_NO_CACHE COUNT(*)= 2 FROM information_schema.processlist WHERE state='wait_in_query_cache_insert';
|
SET DEBUG_SYNC="now WAIT_FOR parked3";
|
||||||
--source include/wait_condition.inc
|
|
||||||
--echo **
|
--echo **
|
||||||
--echo **
|
--echo **
|
||||||
|
|
||||||
--echo ** Signal the DELETE thread, THD1, to continue. It will enter the mutex
|
--echo ** Signal the DELETE thread, THD1, to continue. It will enter the mutex
|
||||||
--echo ** lock and set query cache status to TABLE_FLUSH_IN_PROGRESS and then
|
--echo ** lock and set query cache status to TABLE_FLUSH_IN_PROGRESS and then
|
||||||
--echo ** unlock the mutex before stopping on the next debug hook.
|
--echo ** unlock the mutex before stopping on the next debug hook.
|
||||||
SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_invalidate1' LIMIT 1 INTO @flush_thread_id;
|
SET DEBUG_SYNC="now SIGNAL go1_1";
|
||||||
KILL QUERY @flush_thread_id;
|
|
||||||
--echo ** Assert that we reach the next debug hook.
|
--echo ** Assert that we reach the next debug hook.
|
||||||
LET $wait_condition= SELECT SQL_NO_CACHE COUNT(*)= 1 FROM information_schema.processlist WHERE state='wait_in_query_cache_invalidate2';
|
SET DEBUG_SYNC="now WAIT_FOR parked1_2";
|
||||||
--source include/wait_condition.inc
|
|
||||||
|
|
||||||
--echo **
|
--echo **
|
||||||
--echo ** Signal the remaining debug hooks blocking THD2 and THD3.
|
--echo ** Signal the remaining debug hooks blocking THD2 and THD3.
|
||||||
|
@ -206,10 +207,8 @@ LET $wait_condition= SELECT SQL_NO_CACHE COUNT(*)= 1 FROM information_schema.pro
|
||||||
--echo ** and finally release the mutex. The threads will continue to wait
|
--echo ** and finally release the mutex. The threads will continue to wait
|
||||||
--echo ** until a broadcast signal reaches them causing both threads to
|
--echo ** until a broadcast signal reaches them causing both threads to
|
||||||
--echo ** come alive and check the condition.
|
--echo ** come alive and check the condition.
|
||||||
SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_insert' ORDER BY id ASC LIMIT 1 INTO @thread_id;
|
SET DEBUG_SYNC="now SIGNAL go2";
|
||||||
KILL QUERY @thread_id;
|
SET DEBUG_SYNC="now SIGNAL go3";
|
||||||
SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_insert' ORDER BY id DESC LIMIT 1 INTO @thread_id;
|
|
||||||
KILL QUERY @thread_id;
|
|
||||||
|
|
||||||
--echo **
|
--echo **
|
||||||
--echo ** Finally signal the DELETE statement on THD1 one last time.
|
--echo ** Finally signal the DELETE statement on THD1 one last time.
|
||||||
|
@ -218,11 +217,7 @@ KILL QUERY @thread_id;
|
||||||
--echo ** One signal will be sent to the thread group waiting for executing
|
--echo ** One signal will be sent to the thread group waiting for executing
|
||||||
--echo ** invalidations and a broadcast signal will be sent to the thread
|
--echo ** invalidations and a broadcast signal will be sent to the thread
|
||||||
--echo ** group holding result set writers.
|
--echo ** group holding result set writers.
|
||||||
SELECT SQL_NO_CACHE id FROM information_schema.processlist WHERE state='wait_in_query_cache_invalidate2' LIMIT 1 INTO @flush_thread_id;
|
SET DEBUG_SYNC="now SIGNAL go1_2";
|
||||||
KILL QUERY @flush_thread_id;
|
|
||||||
|
|
||||||
LET $wait_condition= SELECT SQL_NO_CACHE COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE Id = @flush_thread_id AND Command = 'Sleep';
|
|
||||||
--source include/wait_condition.inc
|
|
||||||
|
|
||||||
--echo **
|
--echo **
|
||||||
--echo *************************************************************************
|
--echo *************************************************************************
|
||||||
|
@ -250,6 +245,7 @@ connection default;
|
||||||
disconnect thd1;
|
disconnect thd1;
|
||||||
disconnect thd2;
|
disconnect thd2;
|
||||||
disconnect thd3;
|
disconnect thd3;
|
||||||
|
SET DEBUG_SYNC= 'RESET';
|
||||||
SET GLOBAL query_cache_size= 0;
|
SET GLOBAL query_cache_size= 0;
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
|
@ -259,4 +255,66 @@ FLUSH STATUS;
|
||||||
DROP TABLE t1,t2,t3,t4,t5;
|
DROP TABLE t1,t2,t3,t4,t5;
|
||||||
SET GLOBAL query_cache_size= DEFAULT;
|
SET GLOBAL query_cache_size= DEFAULT;
|
||||||
SET GLOBAL query_cache_type= DEFAULT;
|
SET GLOBAL query_cache_type= DEFAULT;
|
||||||
exit;
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#56822: Add a thread state for sessions waiting on the query cache lock
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET @old_query_cache_size= @@GLOBAL.query_cache_size;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
--enable_warnings
|
||||||
|
CREATE TABLE t1 (a INT);
|
||||||
|
INSERT INTO t1 VALUES (1),(2),(3);
|
||||||
|
|
||||||
|
SET GLOBAL concurrent_insert= 1;
|
||||||
|
SET GLOBAL query_cache_size= 1024*512;
|
||||||
|
SET GLOBAL query_cache_type= ON;
|
||||||
|
|
||||||
|
connect(con1,localhost,root,,test,,);
|
||||||
|
connect(con2,localhost,root,,test,,);
|
||||||
|
|
||||||
|
connection con1;
|
||||||
|
--echo # Switch to connection con1
|
||||||
|
SET DEBUG_SYNC = "wait_in_query_cache_invalidate2 SIGNAL parked WAIT_FOR go";
|
||||||
|
--echo # Send INSERT, will wait in the query cache table invalidation
|
||||||
|
--send INSERT INTO t1 VALUES (4);
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
--echo # Switch to connection default
|
||||||
|
--echo # Wait for insert to reach the debug point
|
||||||
|
SET DEBUG_SYNC = "now WAIT_FOR parked";
|
||||||
|
|
||||||
|
connection con2;
|
||||||
|
--echo # Switch to connection con2
|
||||||
|
--echo # Send a query that should wait on the query cache lock
|
||||||
|
--send RESET QUERY CACHE
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
--echo # Switch to connection default
|
||||||
|
--echo # Wait for the state to be reflected in the processlist
|
||||||
|
let $wait_condition=
|
||||||
|
SELECT COUNT(*) = 1 FROM information_schema.processlist
|
||||||
|
WHERE state = "Waiting for query cache lock" AND info = "RESET QUERY CACHE";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
--echo # Signal that the query cache can be unlocked
|
||||||
|
SET DEBUG_SYNC="now SIGNAL go";
|
||||||
|
|
||||||
|
connection con1;
|
||||||
|
--echo # Reap con1 and disconnect
|
||||||
|
--reap
|
||||||
|
disconnect con1;
|
||||||
|
|
||||||
|
connection con2;
|
||||||
|
--echo # Reap con2 and disconnect
|
||||||
|
--reap
|
||||||
|
disconnect con2;
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
--echo # Restore defaults
|
||||||
|
SET DEBUG_SYNC= 'RESET';
|
||||||
|
RESET QUERY CACHE;
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET GLOBAL query_cache_size= DEFAULT;
|
||||||
|
SET GLOBAL query_cache_type= DEFAULT;
|
||||||
|
|
|
@ -636,6 +636,30 @@ UPDATE t1_aux SET f2 = 2 WHERE f1 = f1_two_inserts()|
|
||||||
DROP TABLE t1_aux, t1_not_null|
|
DROP TABLE t1_aux, t1_not_null|
|
||||||
DROP FUNCTION f1_two_inserts|
|
DROP FUNCTION f1_two_inserts|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#49938: Failing assertion: inode or deadlock in fsp/fsp0fsp.c
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP PROCEDURE IF EXISTS p1|
|
||||||
|
DROP TABLE IF EXISTS t1|
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=INNODB|
|
||||||
|
|
||||||
|
CREATE PROCEDURE p1()
|
||||||
|
BEGIN
|
||||||
|
TRUNCATE TABLE t1;
|
||||||
|
END|
|
||||||
|
|
||||||
|
LOCK TABLES t1 WRITE|
|
||||||
|
CALL p1()|
|
||||||
|
FLUSH TABLES;
|
||||||
|
UNLOCK TABLES|
|
||||||
|
CALL p1()|
|
||||||
|
|
||||||
|
DROP PROCEDURE p1|
|
||||||
|
DROP TABLE t1|
|
||||||
|
|
||||||
#
|
#
|
||||||
# BUG#NNNN: New bug synopsis
|
# BUG#NNNN: New bug synopsis
|
||||||
|
|
|
@ -148,10 +148,15 @@ CREATE TRIGGER t1_ad AFTER DELETE ON t1 FOR EACH ROW SET @b = 1;
|
||||||
SET @a = 0;
|
SET @a = 0;
|
||||||
SET @b = 0;
|
SET @b = 0;
|
||||||
|
|
||||||
|
--error ER_TRUNCATE_ILLEGAL_FK
|
||||||
TRUNCATE t1;
|
TRUNCATE t1;
|
||||||
|
|
||||||
SELECT @a, @b;
|
SELECT @a, @b;
|
||||||
|
|
||||||
|
DELETE FROM t1;
|
||||||
|
|
||||||
|
SELECT @a, @b;
|
||||||
|
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
|
|
||||||
DELETE FROM t1;
|
DELETE FROM t1;
|
||||||
|
|
|
@ -484,6 +484,16 @@ explain select * from t2 where f1=STR_TO_DATE('4/1/2010', '%m/%d/%Y');
|
||||||
|
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#57095: Wrongly chosen expression cache type led to a wrong
|
||||||
|
--echo # result.
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (`b` datetime );
|
||||||
|
INSERT INTO t1 VALUES ('2010-01-01 00:00:00'), ('2010-01-01 00:00:00');
|
||||||
|
SELECT * FROM t1 WHERE b <= coalesce(NULL, now());
|
||||||
|
DROP TABLE t1;
|
||||||
|
--echo #
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 5.5 tests
|
--echo # End of 5.5 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
|
@ -97,7 +97,7 @@ HANDLE my_get_osfhandle(File fd)
|
||||||
|
|
||||||
static int my_get_open_flags(File fd)
|
static int my_get_open_flags(File fd)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("my_get_osfhandle");
|
DBUG_ENTER("my_get_open_flags");
|
||||||
DBUG_ASSERT(fd >= MY_FILE_MIN && fd < (int)my_file_limit);
|
DBUG_ASSERT(fd >= MY_FILE_MIN && fd < (int)my_file_limit);
|
||||||
DBUG_RETURN(my_file_info[fd].oflag);
|
DBUG_RETURN(my_file_info[fd].oflag);
|
||||||
}
|
}
|
||||||
|
@ -321,7 +321,7 @@ size_t my_win_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset)
|
||||||
if(lastError == ERROR_HANDLE_EOF || lastError == ERROR_BROKEN_PIPE)
|
if(lastError == ERROR_HANDLE_EOF || lastError == ERROR_BROKEN_PIPE)
|
||||||
DBUG_RETURN(0); /*return 0 at EOF*/
|
DBUG_RETURN(0); /*return 0 at EOF*/
|
||||||
my_osmaperr(lastError);
|
my_osmaperr(lastError);
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN((size_t)-1);
|
||||||
}
|
}
|
||||||
DBUG_RETURN(nBytesRead);
|
DBUG_RETURN(nBytesRead);
|
||||||
}
|
}
|
||||||
|
@ -352,7 +352,7 @@ size_t my_win_read(File Filedes, uchar *Buffer, size_t Count)
|
||||||
if(lastError == ERROR_HANDLE_EOF || lastError == ERROR_BROKEN_PIPE)
|
if(lastError == ERROR_HANDLE_EOF || lastError == ERROR_BROKEN_PIPE)
|
||||||
DBUG_RETURN(0); /*return 0 at EOF*/
|
DBUG_RETURN(0); /*return 0 at EOF*/
|
||||||
my_osmaperr(lastError);
|
my_osmaperr(lastError);
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN((size_t)-1);
|
||||||
}
|
}
|
||||||
DBUG_RETURN(nBytesRead);
|
DBUG_RETURN(nBytesRead);
|
||||||
}
|
}
|
||||||
|
@ -386,7 +386,7 @@ size_t my_win_pwrite(File Filedes, const uchar *Buffer, size_t Count,
|
||||||
if(!WriteFile(hFile, Buffer, (DWORD)Count, &nBytesWritten, &ov))
|
if(!WriteFile(hFile, Buffer, (DWORD)Count, &nBytesWritten, &ov))
|
||||||
{
|
{
|
||||||
my_osmaperr(GetLastError());
|
my_osmaperr(GetLastError());
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN((size_t)-1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DBUG_RETURN(nBytesWritten);
|
DBUG_RETURN(nBytesWritten);
|
||||||
|
@ -427,6 +427,15 @@ size_t my_win_write(File fd, const uchar *Buffer, size_t Count)
|
||||||
DBUG_ENTER("my_win_write");
|
DBUG_ENTER("my_win_write");
|
||||||
DBUG_PRINT("my",("Filedes: %d, Buffer: %p, Count %llu", fd, Buffer,
|
DBUG_PRINT("my",("Filedes: %d, Buffer: %p, Count %llu", fd, Buffer,
|
||||||
(ulonglong)Count));
|
(ulonglong)Count));
|
||||||
|
|
||||||
|
if(!Count)
|
||||||
|
DBUG_RETURN(0);
|
||||||
|
|
||||||
|
#ifdef _WIN64
|
||||||
|
if(Count > UINT_MAX)
|
||||||
|
Count= UINT_MAX;
|
||||||
|
#endif
|
||||||
|
|
||||||
if(my_get_open_flags(fd) & _O_APPEND)
|
if(my_get_open_flags(fd) & _O_APPEND)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -442,10 +451,10 @@ size_t my_win_write(File fd, const uchar *Buffer, size_t Count)
|
||||||
hFile= my_get_osfhandle(fd);
|
hFile= my_get_osfhandle(fd);
|
||||||
if(!WriteFile(hFile, Buffer, (DWORD)Count, &nWritten, pov))
|
if(!WriteFile(hFile, Buffer, (DWORD)Count, &nWritten, pov))
|
||||||
{
|
{
|
||||||
nWritten= (size_t)-1;
|
|
||||||
my_osmaperr(GetLastError());
|
my_osmaperr(GetLastError());
|
||||||
|
DBUG_RETURN((size_t)-1);
|
||||||
}
|
}
|
||||||
DBUG_RETURN((size_t)nWritten);
|
DBUG_RETURN(nWritten);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -181,7 +181,7 @@ mysql_declare_plugin_end;
|
||||||
To support all this variety, the dialog plugin has a callback function
|
To support all this variety, the dialog plugin has a callback function
|
||||||
"authentication_dialog_ask". If the client has a function of this name
|
"authentication_dialog_ask". If the client has a function of this name
|
||||||
dialog plugin will use it for communication with the user. Otherwise
|
dialog plugin will use it for communication with the user. Otherwise
|
||||||
a default gets() based implementation will be used.
|
a default fgets() based implementation will be used.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -208,12 +208,15 @@ static mysql_authentication_dialog_ask_t ask;
|
||||||
static char *builtin_ask(MYSQL *mysql __attribute__((unused)),
|
static char *builtin_ask(MYSQL *mysql __attribute__((unused)),
|
||||||
int type __attribute__((unused)),
|
int type __attribute__((unused)),
|
||||||
const char *prompt,
|
const char *prompt,
|
||||||
char *buf, int buf_len __attribute__((unused)))
|
char *buf, int buf_len)
|
||||||
{
|
{
|
||||||
|
char *ptr;
|
||||||
fputs(prompt, stdout);
|
fputs(prompt, stdout);
|
||||||
fputc(' ', stdout);
|
fputc(' ', stdout);
|
||||||
if (gets(buf) == 0)
|
if (fgets(buf, buf_len, stdin) == NULL)
|
||||||
return 0;
|
return NULL;
|
||||||
|
if ((ptr= strchr(buf, '\n')))
|
||||||
|
*ptr= 0;
|
||||||
|
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2923,7 +2923,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
|
||||||
uint port, const char *unix_socket,ulong client_flag)
|
uint port, const char *unix_socket,ulong client_flag)
|
||||||
{
|
{
|
||||||
char buff[NAME_LEN+USERNAME_LENGTH+100];
|
char buff[NAME_LEN+USERNAME_LENGTH+100];
|
||||||
int scramble_data_len, pkt_scramble_len;
|
int scramble_data_len, pkt_scramble_len= 0;
|
||||||
char *end,*host_info= 0, *server_version_end, *pkt_end;
|
char *end,*host_info= 0, *server_version_end, *pkt_end;
|
||||||
char *scramble_data;
|
char *scramble_data;
|
||||||
const char *scramble_plugin;
|
const char *scramble_plugin;
|
||||||
|
|
|
@ -3337,47 +3337,89 @@ int ha_partition::delete_row(const uchar *buf)
|
||||||
Called from sql_delete.cc by mysql_delete().
|
Called from sql_delete.cc by mysql_delete().
|
||||||
Called from sql_select.cc by JOIN::reinit().
|
Called from sql_select.cc by JOIN::reinit().
|
||||||
Called from sql_union.cc by st_select_lex_unit::exec().
|
Called from sql_union.cc by st_select_lex_unit::exec().
|
||||||
|
|
||||||
Also used for handle ALTER TABLE t TRUNCATE PARTITION ...
|
|
||||||
NOTE: auto increment value will be truncated in that partition as well!
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ha_partition::delete_all_rows()
|
int ha_partition::delete_all_rows()
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
bool truncate= FALSE;
|
|
||||||
handler **file;
|
handler **file;
|
||||||
THD *thd= ha_thd();
|
|
||||||
DBUG_ENTER("ha_partition::delete_all_rows");
|
DBUG_ENTER("ha_partition::delete_all_rows");
|
||||||
|
|
||||||
if (thd->lex->sql_command == SQLCOM_TRUNCATE)
|
file= m_file;
|
||||||
|
do
|
||||||
{
|
{
|
||||||
Alter_info *alter_info= &thd->lex->alter_info;
|
if ((error= (*file)->ha_delete_all_rows()))
|
||||||
/* TRUNCATE also means resetting auto_increment */
|
DBUG_RETURN(error);
|
||||||
|
} while (*(++file));
|
||||||
|
DBUG_RETURN(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Manually truncate the table.
|
||||||
|
|
||||||
|
@retval 0 Success.
|
||||||
|
@retval > 0 Error code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int ha_partition::truncate()
|
||||||
|
{
|
||||||
|
int error;
|
||||||
|
handler **file;
|
||||||
|
DBUG_ENTER("ha_partition::truncate");
|
||||||
|
|
||||||
|
/*
|
||||||
|
TRUNCATE also means resetting auto_increment. Hence, reset
|
||||||
|
it so that it will be initialized again at the next use.
|
||||||
|
*/
|
||||||
lock_auto_increment();
|
lock_auto_increment();
|
||||||
table_share->ha_part_data->next_auto_inc_val= 0;
|
table_share->ha_part_data->next_auto_inc_val= 0;
|
||||||
table_share->ha_part_data->auto_inc_initialized= FALSE;
|
table_share->ha_part_data->auto_inc_initialized= FALSE;
|
||||||
unlock_auto_increment();
|
unlock_auto_increment();
|
||||||
if (alter_info->flags & ALTER_ADMIN_PARTITION)
|
|
||||||
|
file= m_file;
|
||||||
|
do
|
||||||
{
|
{
|
||||||
/* ALTER TABLE t TRUNCATE PARTITION ... */
|
if ((error= (*file)->ha_truncate()))
|
||||||
|
DBUG_RETURN(error);
|
||||||
|
} while (*(++file));
|
||||||
|
DBUG_RETURN(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Truncate a set of specific partitions.
|
||||||
|
|
||||||
|
@remark Auto increment value will be truncated in that partition as well!
|
||||||
|
|
||||||
|
ALTER TABLE t TRUNCATE PARTITION ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
int ha_partition::truncate_partition(Alter_info *alter_info)
|
||||||
|
{
|
||||||
|
int error= 0;
|
||||||
List_iterator<partition_element> part_it(m_part_info->partitions);
|
List_iterator<partition_element> part_it(m_part_info->partitions);
|
||||||
int saved_error= 0;
|
|
||||||
uint num_parts= m_part_info->num_parts;
|
uint num_parts= m_part_info->num_parts;
|
||||||
uint num_subparts= m_part_info->num_subparts;
|
uint num_subparts= m_part_info->num_subparts;
|
||||||
uint i= 0;
|
uint i= 0;
|
||||||
uint num_parts_set= alter_info->partition_names.elements;
|
uint num_parts_set= alter_info->partition_names.elements;
|
||||||
uint num_parts_found= set_part_state(alter_info, m_part_info,
|
uint num_parts_found= set_part_state(alter_info, m_part_info,
|
||||||
PART_ADMIN);
|
PART_ADMIN);
|
||||||
|
DBUG_ENTER("ha_partition::truncate_partition");
|
||||||
|
|
||||||
|
/*
|
||||||
|
TRUNCATE also means resetting auto_increment. Hence, reset
|
||||||
|
it so that it will be initialized again at the next use.
|
||||||
|
*/
|
||||||
|
lock_auto_increment();
|
||||||
|
table_share->ha_part_data->next_auto_inc_val= 0;
|
||||||
|
table_share->ha_part_data->auto_inc_initialized= FALSE;
|
||||||
|
unlock_auto_increment();
|
||||||
|
|
||||||
if (num_parts_set != num_parts_found &&
|
if (num_parts_set != num_parts_found &&
|
||||||
(!(alter_info->flags & ALTER_ALL_PARTITION)))
|
(!(alter_info->flags & ALTER_ALL_PARTITION)))
|
||||||
DBUG_RETURN(HA_ERR_NO_PARTITION_FOUND);
|
DBUG_RETURN(HA_ERR_NO_PARTITION_FOUND);
|
||||||
|
|
||||||
/*
|
|
||||||
Cannot return HA_ERR_WRONG_COMMAND here without correct pruning
|
|
||||||
since that whould delete the whole table row by row in sql_delete.cc
|
|
||||||
*/
|
|
||||||
bitmap_clear_all(&m_part_info->used_partitions);
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
partition_element *part_elem= part_it++;
|
partition_element *part_elem= part_it++;
|
||||||
|
@ -3393,54 +3435,22 @@ int ha_partition::delete_all_rows()
|
||||||
{
|
{
|
||||||
sub_elem= subpart_it++;
|
sub_elem= subpart_it++;
|
||||||
part= i * num_subparts + j;
|
part= i * num_subparts + j;
|
||||||
bitmap_set_bit(&m_part_info->used_partitions, part);
|
|
||||||
if (!saved_error)
|
|
||||||
{
|
|
||||||
DBUG_PRINT("info", ("truncate subpartition %u (%s)",
|
DBUG_PRINT("info", ("truncate subpartition %u (%s)",
|
||||||
part, sub_elem->partition_name));
|
part, sub_elem->partition_name));
|
||||||
if ((error= m_file[part]->ha_delete_all_rows()))
|
if ((error= m_file[part]->ha_truncate()))
|
||||||
saved_error= error;
|
break;
|
||||||
/* If not reset_auto_increment is supported, just accept it */
|
|
||||||
if (!saved_error &&
|
|
||||||
(error= m_file[part]->ha_reset_auto_increment(0)) &&
|
|
||||||
error != HA_ERR_WRONG_COMMAND)
|
|
||||||
saved_error= error;
|
|
||||||
}
|
|
||||||
} while (++j < num_subparts);
|
} while (++j < num_subparts);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("truncate partition %u (%s)", i,
|
DBUG_PRINT("info", ("truncate partition %u (%s)", i,
|
||||||
part_elem->partition_name));
|
part_elem->partition_name));
|
||||||
bitmap_set_bit(&m_part_info->used_partitions, i);
|
error= m_file[i]->ha_truncate();
|
||||||
if (!saved_error)
|
|
||||||
{
|
|
||||||
if ((error= m_file[i]->ha_delete_all_rows()) && !saved_error)
|
|
||||||
saved_error= error;
|
|
||||||
/* If not reset_auto_increment is supported, just accept it */
|
|
||||||
if (!saved_error &&
|
|
||||||
(error= m_file[i]->ha_reset_auto_increment(0)) &&
|
|
||||||
error != HA_ERR_WRONG_COMMAND)
|
|
||||||
saved_error= error;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
part_elem->part_state= PART_NORMAL;
|
part_elem->part_state= PART_NORMAL;
|
||||||
}
|
}
|
||||||
} while (++i < num_parts);
|
} while (!error && (++i < num_parts));
|
||||||
DBUG_RETURN(saved_error);
|
|
||||||
}
|
|
||||||
truncate= TRUE;
|
|
||||||
}
|
|
||||||
file= m_file;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
if ((error= (*file)->ha_delete_all_rows()))
|
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
/* Ignore the error */
|
|
||||||
if (truncate)
|
|
||||||
(void) (*file)->ha_reset_auto_increment(0);
|
|
||||||
} while (*(++file));
|
|
||||||
DBUG_RETURN(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -6327,8 +6337,8 @@ void ha_partition::print_error(int error, myf errflag)
|
||||||
/* Should probably look for my own errors first */
|
/* Should probably look for my own errors first */
|
||||||
DBUG_PRINT("enter", ("error: %d", error));
|
DBUG_PRINT("enter", ("error: %d", error));
|
||||||
|
|
||||||
if (error == HA_ERR_NO_PARTITION_FOUND &&
|
if ((error == HA_ERR_NO_PARTITION_FOUND) &&
|
||||||
thd->lex->sql_command != SQLCOM_TRUNCATE)
|
! (thd->lex->alter_info.flags & ALTER_TRUNCATE_PARTITION))
|
||||||
m_part_info->print_no_partition_found(table);
|
m_part_info->print_no_partition_found(table);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -346,6 +346,7 @@ public:
|
||||||
virtual int update_row(const uchar * old_data, uchar * new_data);
|
virtual int update_row(const uchar * old_data, uchar * new_data);
|
||||||
virtual int delete_row(const uchar * buf);
|
virtual int delete_row(const uchar * buf);
|
||||||
virtual int delete_all_rows(void);
|
virtual int delete_all_rows(void);
|
||||||
|
virtual int truncate();
|
||||||
virtual void start_bulk_insert(ha_rows rows);
|
virtual void start_bulk_insert(ha_rows rows);
|
||||||
virtual int end_bulk_insert();
|
virtual int end_bulk_insert();
|
||||||
private:
|
private:
|
||||||
|
@ -354,6 +355,15 @@ private:
|
||||||
long estimate_read_buffer_size(long original_size);
|
long estimate_read_buffer_size(long original_size);
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
/*
|
||||||
|
Method for truncating a specific partition.
|
||||||
|
(i.e. ALTER TABLE t1 TRUNCATE PARTITION p).
|
||||||
|
|
||||||
|
@remark This method is a partitioning-specific hook
|
||||||
|
and thus not a member of the general SE API.
|
||||||
|
*/
|
||||||
|
int truncate_partition(Alter_info *);
|
||||||
|
|
||||||
virtual bool is_fatal_error(int error, uint flags)
|
virtual bool is_fatal_error(int error, uint flags)
|
||||||
{
|
{
|
||||||
if (!handler::is_fatal_error(error, flags) ||
|
if (!handler::is_fatal_error(error, flags) ||
|
||||||
|
|
|
@ -3208,6 +3208,21 @@ handler::ha_delete_all_rows()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Truncate table: public interface.
|
||||||
|
|
||||||
|
@sa handler::truncate()
|
||||||
|
*/
|
||||||
|
|
||||||
|
int
|
||||||
|
handler::ha_truncate()
|
||||||
|
{
|
||||||
|
mark_trx_read_write();
|
||||||
|
|
||||||
|
return truncate();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reset auto increment: public interface.
|
Reset auto increment: public interface.
|
||||||
|
|
||||||
|
|
|
@ -1331,6 +1331,7 @@ public:
|
||||||
int ha_bulk_update_row(const uchar *old_data, uchar *new_data,
|
int ha_bulk_update_row(const uchar *old_data, uchar *new_data,
|
||||||
uint *dup_key_found);
|
uint *dup_key_found);
|
||||||
int ha_delete_all_rows();
|
int ha_delete_all_rows();
|
||||||
|
int ha_truncate();
|
||||||
int ha_reset_auto_increment(ulonglong value);
|
int ha_reset_auto_increment(ulonglong value);
|
||||||
int ha_optimize(THD* thd, HA_CHECK_OPT* check_opt);
|
int ha_optimize(THD* thd, HA_CHECK_OPT* check_opt);
|
||||||
int ha_analyze(THD* thd, HA_CHECK_OPT* check_opt);
|
int ha_analyze(THD* thd, HA_CHECK_OPT* check_opt);
|
||||||
|
@ -1644,8 +1645,33 @@ public:
|
||||||
{ return(NULL);} /* gets tablespace name from handler */
|
{ return(NULL);} /* gets tablespace name from handler */
|
||||||
/** used in ALTER TABLE; 1 if changing storage engine is allowed */
|
/** used in ALTER TABLE; 1 if changing storage engine is allowed */
|
||||||
virtual bool can_switch_engines() { return 1; }
|
virtual bool can_switch_engines() { return 1; }
|
||||||
/** used in REPLACE; is > 0 if table is referred by a FOREIGN KEY */
|
/**
|
||||||
virtual int get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list)
|
Get the list of foreign keys in this table.
|
||||||
|
|
||||||
|
@remark Returns the set of foreign keys where this table is the
|
||||||
|
dependent or child table.
|
||||||
|
|
||||||
|
@param thd The thread handle.
|
||||||
|
@param f_key_list[out] The list of foreign keys.
|
||||||
|
|
||||||
|
@return The handler error code or zero for success.
|
||||||
|
*/
|
||||||
|
virtual int
|
||||||
|
get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list)
|
||||||
|
{ return 0; }
|
||||||
|
/**
|
||||||
|
Get the list of foreign keys referencing this table.
|
||||||
|
|
||||||
|
@remark Returns the set of foreign keys where this table is the
|
||||||
|
referenced or parent table.
|
||||||
|
|
||||||
|
@param thd The thread handle.
|
||||||
|
@param f_key_list[out] The list of foreign keys.
|
||||||
|
|
||||||
|
@return The handler error code or zero for success.
|
||||||
|
*/
|
||||||
|
virtual int
|
||||||
|
get_parent_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list)
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
virtual uint referenced_by_foreign_key() { return 0;}
|
virtual uint referenced_by_foreign_key() { return 0;}
|
||||||
virtual void init_table_handle_for_HANDLER()
|
virtual void init_table_handle_for_HANDLER()
|
||||||
|
@ -2010,16 +2036,34 @@ private:
|
||||||
This is called to delete all rows in a table
|
This is called to delete all rows in a table
|
||||||
If the handler don't support this, then this function will
|
If the handler don't support this, then this function will
|
||||||
return HA_ERR_WRONG_COMMAND and MySQL will delete the rows one
|
return HA_ERR_WRONG_COMMAND and MySQL will delete the rows one
|
||||||
by one. It should reset auto_increment if
|
by one.
|
||||||
thd->lex->sql_command == SQLCOM_TRUNCATE.
|
|
||||||
*/
|
*/
|
||||||
virtual int delete_all_rows()
|
virtual int delete_all_rows()
|
||||||
{ return (my_errno=HA_ERR_WRONG_COMMAND); }
|
{ return (my_errno=HA_ERR_WRONG_COMMAND); }
|
||||||
|
/**
|
||||||
|
Quickly remove all rows from a table.
|
||||||
|
|
||||||
|
@remark This method is responsible for implementing MySQL's TRUNCATE
|
||||||
|
TABLE statement, which is a DDL operation. As such, a engine
|
||||||
|
can bypass certain integrity checks and in some cases avoid
|
||||||
|
fine-grained locking (e.g. row locks) which would normally be
|
||||||
|
required for a DELETE statement.
|
||||||
|
|
||||||
|
@remark Typically, truncate is not used if it can result in integrity
|
||||||
|
violation. For example, truncate is not used when a foreign
|
||||||
|
key references the table, but it might be used if foreign key
|
||||||
|
checks are disabled.
|
||||||
|
|
||||||
|
@remark Engine is responsible for resetting the auto-increment counter.
|
||||||
|
|
||||||
|
@remark The table is locked in exclusive mode.
|
||||||
|
*/
|
||||||
|
virtual int truncate()
|
||||||
|
{ return HA_ERR_WRONG_COMMAND; }
|
||||||
/**
|
/**
|
||||||
Reset the auto-increment counter to the given value, i.e. the next row
|
Reset the auto-increment counter to the given value, i.e. the next row
|
||||||
inserted will get the given value. This is called e.g. after TRUNCATE
|
inserted will get the given value. HA_ERR_WRONG_COMMAND is returned by
|
||||||
is emulated by doing a 'DELETE FROM t'. HA_ERR_WRONG_COMMAND is
|
storage engines that don't support this operation.
|
||||||
returned by storage engines that don't support this operation.
|
|
||||||
*/
|
*/
|
||||||
virtual int reset_auto_increment(ulonglong value)
|
virtual int reset_auto_increment(ulonglong value)
|
||||||
{ return HA_ERR_WRONG_COMMAND; }
|
{ return HA_ERR_WRONG_COMMAND; }
|
||||||
|
|
|
@ -1783,8 +1783,7 @@ bool agg_item_set_converter(DTCollation &coll, const char *fname,
|
||||||
In case we're in statement prepare, create conversion item
|
In case we're in statement prepare, create conversion item
|
||||||
in its memory: it will be reused on each execute.
|
in its memory: it will be reused on each execute.
|
||||||
*/
|
*/
|
||||||
arena= thd->is_stmt_prepare() ? thd->activate_stmt_arena_if_needed(&backup)
|
arena= thd->activate_stmt_arena_if_needed(&backup);
|
||||||
: NULL;
|
|
||||||
|
|
||||||
for (i= 0, arg= args; i < nargs; i++, arg+= item_sep)
|
for (i= 0, arg= args; i < nargs; i++, arg+= item_sep)
|
||||||
{
|
{
|
||||||
|
@ -7356,9 +7355,11 @@ Item_cache* Item_cache::get_cache(const Item *item, const Item_result type)
|
||||||
case DECIMAL_RESULT:
|
case DECIMAL_RESULT:
|
||||||
return new Item_cache_decimal();
|
return new Item_cache_decimal();
|
||||||
case STRING_RESULT:
|
case STRING_RESULT:
|
||||||
if (item->field_type() == MYSQL_TYPE_DATE ||
|
/* Not all functions that return DATE/TIME are actually DATE/TIME funcs. */
|
||||||
|
if ((item->field_type() == MYSQL_TYPE_DATE ||
|
||||||
item->field_type() == MYSQL_TYPE_DATETIME ||
|
item->field_type() == MYSQL_TYPE_DATETIME ||
|
||||||
item->field_type() == MYSQL_TYPE_TIME)
|
item->field_type() == MYSQL_TYPE_TIME) &&
|
||||||
|
(const_cast<Item*>(item))->result_as_longlong())
|
||||||
return new Item_cache_datetime(item->field_type());
|
return new Item_cache_datetime(item->field_type());
|
||||||
return new Item_cache_str(item);
|
return new Item_cache_str(item);
|
||||||
case ROW_RESULT:
|
case ROW_RESULT:
|
||||||
|
|
|
@ -3029,6 +3029,14 @@ void Item_func_case::fix_length_and_dec()
|
||||||
{
|
{
|
||||||
if (agg_arg_charsets_for_string_result(collation, agg, nagg))
|
if (agg_arg_charsets_for_string_result(collation, agg, nagg))
|
||||||
return;
|
return;
|
||||||
|
/*
|
||||||
|
Copy all THEN and ELSE items back to args[] array.
|
||||||
|
Some of the items might have been changed to Item_func_conv_charset.
|
||||||
|
*/
|
||||||
|
for (nagg= 0 ; nagg < ncases / 2 ; nagg++)
|
||||||
|
args[nagg * 2 + 1]= agg[nagg];
|
||||||
|
if (else_expr_num != -1)
|
||||||
|
args[else_expr_num]= agg[nagg++];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
collation.set_numeric();
|
collation.set_numeric();
|
||||||
|
|
|
@ -2299,7 +2299,8 @@ String *Item_func_format::val_str_ascii(String *str)
|
||||||
if (lc->grouping[0] > 0 &&
|
if (lc->grouping[0] > 0 &&
|
||||||
str_length >= dec_length + 1 + lc->grouping[0])
|
str_length >= dec_length + 1 + lc->grouping[0])
|
||||||
{
|
{
|
||||||
char buf[DECIMAL_MAX_STR_LENGTH * 2]; /* 2 - in the worst case when grouping=1 */
|
/* We need space for ',' between each group of digits as well. */
|
||||||
|
char buf[2 * FLOATING_POINT_BUFFER];
|
||||||
int count;
|
int count;
|
||||||
const char *grouping= lc->grouping;
|
const char *grouping= lc->grouping;
|
||||||
char sign_length= *str->ptr() == '-' ? 1 : 0;
|
char sign_length= *str->ptr() == '-' ? 1 : 0;
|
||||||
|
@ -2323,7 +2324,7 @@ String *Item_func_format::val_str_ascii(String *str)
|
||||||
count will be initialized to -1 and
|
count will be initialized to -1 and
|
||||||
we'll never get into this "if" anymore.
|
we'll never get into this "if" anymore.
|
||||||
*/
|
*/
|
||||||
if (!count)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
*--dst= lc->thousand_sep;
|
*--dst= lc->thousand_sep;
|
||||||
if (grouping[1])
|
if (grouping[1])
|
||||||
|
|
|
@ -2857,10 +2857,11 @@ void Item_func_add_time::fix_length_and_dec()
|
||||||
Result: Time value or datetime value
|
Result: Time value or datetime value
|
||||||
*/
|
*/
|
||||||
|
|
||||||
String *Item_func_add_time::val_str(String *str)
|
MYSQL_TIME *Item_func_add_time::val_datetime(MYSQL_TIME *time,
|
||||||
|
date_time_format_types *format)
|
||||||
{
|
{
|
||||||
DBUG_ASSERT(fixed == 1);
|
DBUG_ASSERT(fixed == 1);
|
||||||
MYSQL_TIME l_time1, l_time2, l_time3;
|
MYSQL_TIME l_time1, l_time2;
|
||||||
bool is_time= 0;
|
bool is_time= 0;
|
||||||
long days, microseconds;
|
long days, microseconds;
|
||||||
longlong seconds;
|
longlong seconds;
|
||||||
|
@ -2886,9 +2887,9 @@ String *Item_func_add_time::val_str(String *str)
|
||||||
if (l_time1.neg != l_time2.neg)
|
if (l_time1.neg != l_time2.neg)
|
||||||
l_sign= -l_sign;
|
l_sign= -l_sign;
|
||||||
|
|
||||||
bzero((char *)&l_time3, sizeof(l_time3));
|
bzero((char *)time, sizeof(MYSQL_TIME));
|
||||||
|
|
||||||
l_time3.neg= calc_time_diff(&l_time1, &l_time2, -l_sign,
|
time->neg= calc_time_diff(&l_time1, &l_time2, -l_sign,
|
||||||
&seconds, µseconds);
|
&seconds, µseconds);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2896,31 +2897,28 @@ String *Item_func_add_time::val_str(String *str)
|
||||||
is non-zero we need to swap sign to get proper result.
|
is non-zero we need to swap sign to get proper result.
|
||||||
*/
|
*/
|
||||||
if (l_time1.neg && (seconds || microseconds))
|
if (l_time1.neg && (seconds || microseconds))
|
||||||
l_time3.neg= 1-l_time3.neg; // Swap sign of result
|
time->neg= 1 - time->neg; // Swap sign of result
|
||||||
|
|
||||||
if (!is_time && l_time3.neg)
|
if (!is_time && time->neg)
|
||||||
goto null_date;
|
goto null_date;
|
||||||
|
|
||||||
days= (long)(seconds/86400L);
|
days= (long)(seconds/86400L);
|
||||||
|
|
||||||
calc_time_from_sec(&l_time3, (long)(seconds%86400L), microseconds);
|
calc_time_from_sec(time, (long)(seconds%86400L), microseconds);
|
||||||
|
|
||||||
if (!is_time)
|
if (!is_time)
|
||||||
{
|
{
|
||||||
get_date_from_daynr(days,&l_time3.year,&l_time3.month,&l_time3.day);
|
get_date_from_daynr(days, &time->year, &time->month, &time->day);
|
||||||
if (l_time3.day &&
|
*format= l_time1.second_part || l_time2.second_part ?
|
||||||
!make_datetime(l_time1.second_part || l_time2.second_part ?
|
DATE_TIME_MICROSECOND : DATE_TIME;
|
||||||
DATE_TIME_MICROSECOND : DATE_TIME,
|
if (time->day)
|
||||||
&l_time3, str))
|
return time;
|
||||||
return str;
|
|
||||||
goto null_date;
|
goto null_date;
|
||||||
}
|
}
|
||||||
|
*format= l_time1.second_part || l_time2.second_part ?
|
||||||
l_time3.hour+= days*24;
|
TIME_MICROSECOND : TIME_ONLY;
|
||||||
if (!make_datetime_with_warn(l_time1.second_part || l_time2.second_part ?
|
time->hour+= days*24;
|
||||||
TIME_MICROSECOND : TIME_ONLY,
|
return time;
|
||||||
&l_time3, str))
|
|
||||||
return str;
|
|
||||||
|
|
||||||
null_date:
|
null_date:
|
||||||
null_value=1;
|
null_value=1;
|
||||||
|
@ -2928,6 +2926,38 @@ null_date:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
String *Item_func_add_time::val_str(String *str)
|
||||||
|
{
|
||||||
|
MYSQL_TIME ltime;
|
||||||
|
date_time_format_types format;
|
||||||
|
|
||||||
|
val_datetime(<ime, &format);
|
||||||
|
|
||||||
|
if (null_value)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (!make_datetime_with_warn(format, <ime, str))
|
||||||
|
return str;
|
||||||
|
|
||||||
|
null_value= 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
longlong Item_func_add_time::val_int()
|
||||||
|
{
|
||||||
|
MYSQL_TIME ltime;
|
||||||
|
date_time_format_types format;
|
||||||
|
|
||||||
|
val_datetime(<ime, &format);
|
||||||
|
|
||||||
|
if (null_value)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return TIME_to_ulonglong_datetime(<ime);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Item_func_add_time::print(String *str, enum_query_type query_type)
|
void Item_func_add_time::print(String *str, enum_query_type query_type)
|
||||||
{
|
{
|
||||||
if (is_date)
|
if (is_date)
|
||||||
|
|
|
@ -948,6 +948,8 @@ public:
|
||||||
return save_date_in_field(field);
|
return save_date_in_field(field);
|
||||||
return Item_str_func::save_in_field(field, no_conversions);
|
return Item_str_func::save_in_field(field, no_conversions);
|
||||||
}
|
}
|
||||||
|
longlong val_int();
|
||||||
|
MYSQL_TIME *val_datetime(MYSQL_TIME *time, date_time_format_types *format);
|
||||||
};
|
};
|
||||||
|
|
||||||
class Item_func_timediff :public Item_str_timefunc
|
class Item_func_timediff :public Item_str_timefunc
|
||||||
|
|
|
@ -159,15 +159,20 @@ static void inline slave_rows_error_report(enum loglevel level, int ha_error,
|
||||||
err->get_sql_errno());
|
err->get_sql_errno());
|
||||||
}
|
}
|
||||||
|
|
||||||
rli->report(level, thd->is_error()? thd->stmt_da->sql_errno() : 0,
|
if (ha_error != 0)
|
||||||
|
rli->report(level, thd->is_error() ? thd->stmt_da->sql_errno() : 0,
|
||||||
"Could not execute %s event on table %s.%s;"
|
"Could not execute %s event on table %s.%s;"
|
||||||
"%s handler error %s; "
|
"%s handler error %s; "
|
||||||
"the event's master log %s, end_log_pos %lu",
|
"the event's master log %s, end_log_pos %lu",
|
||||||
type, table->s->db.str,
|
type, table->s->db.str, table->s->table_name.str,
|
||||||
table->s->table_name.str,
|
buff, handler_error == NULL ? "<unknown>" : handler_error,
|
||||||
buff,
|
|
||||||
handler_error == NULL? "<unknown>" : handler_error,
|
|
||||||
log_name, pos);
|
log_name, pos);
|
||||||
|
else
|
||||||
|
rli->report(level, thd->is_error() ? thd->stmt_da->sql_errno() : 0,
|
||||||
|
"Could not execute %s event on table %s.%s;"
|
||||||
|
"%s the event's master log %s, end_log_pos %lu",
|
||||||
|
type, table->s->db.str, table->s->table_name.str,
|
||||||
|
buff, log_name, pos);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -7811,19 +7816,16 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
|
||||||
/Sven
|
/Sven
|
||||||
*/
|
*/
|
||||||
thd->reset_current_stmt_binlog_format_row();
|
thd->reset_current_stmt_binlog_format_row();
|
||||||
const_cast<Relay_log_info*>(rli)->cleanup_context(thd, error);
|
|
||||||
thd->is_slave_error= 1;
|
thd->is_slave_error= 1;
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (get_flags(STMT_END_F))
|
if (get_flags(STMT_END_F) && (error= rows_event_stmt_cleanup(rli, thd)))
|
||||||
if ((error= rows_event_stmt_cleanup(rli, thd)))
|
slave_rows_error_report(ERROR_LEVEL,
|
||||||
rli->report(ERROR_LEVEL, error,
|
thd->is_error() ? 0 : error,
|
||||||
"Error in %s event: commit of row events failed, "
|
rli, thd, table,
|
||||||
"table `%s`.`%s`",
|
get_type_str(),
|
||||||
get_type_str(), m_table->s->db.str,
|
RPL_LOG_NAME, (ulong) log_pos);
|
||||||
m_table->s->table_name.str);
|
|
||||||
|
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -265,6 +265,8 @@ extern "C" sig_handler handle_segfault(int sig);
|
||||||
|
|
||||||
/* Constants */
|
/* Constants */
|
||||||
|
|
||||||
|
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||||
|
|
||||||
const char *show_comp_option_name[]= {"YES", "NO", "DISABLED"};
|
const char *show_comp_option_name[]= {"YES", "NO", "DISABLED"};
|
||||||
|
|
||||||
static const char *tc_heuristic_recover_names[]=
|
static const char *tc_heuristic_recover_names[]=
|
||||||
|
@ -3200,6 +3202,11 @@ static int init_common_variables()
|
||||||
return 1;
|
return 1;
|
||||||
set_server_version();
|
set_server_version();
|
||||||
|
|
||||||
|
#ifndef EMBEDDED_LIBRARY
|
||||||
|
if (opt_help && !opt_verbose)
|
||||||
|
unireg_abort(0);
|
||||||
|
#endif /*!EMBEDDED_LIBRARY*/
|
||||||
|
|
||||||
DBUG_PRINT("info",("%s Ver %s for %s on %s\n",my_progname,
|
DBUG_PRINT("info",("%s Ver %s for %s on %s\n",my_progname,
|
||||||
server_version, SYSTEM_TYPE,MACHINE_TYPE));
|
server_version, SYSTEM_TYPE,MACHINE_TYPE));
|
||||||
|
|
||||||
|
@ -3237,12 +3244,11 @@ static int init_common_variables()
|
||||||
desired page sizes.
|
desired page sizes.
|
||||||
*/
|
*/
|
||||||
int nelem;
|
int nelem;
|
||||||
int max_desired_page_size;
|
size_t max_desired_page_size;
|
||||||
int max_page_size;
|
|
||||||
if (opt_super_large_pages)
|
if (opt_super_large_pages)
|
||||||
max_page_size= SUPER_LARGE_PAGESIZE;
|
max_desired_page_size= SUPER_LARGE_PAGESIZE;
|
||||||
else
|
else
|
||||||
max_page_size= LARGE_PAGESIZE;
|
max_desired_page_size= LARGE_PAGESIZE;
|
||||||
nelem = getpagesizes(NULL, 0);
|
nelem = getpagesizes(NULL, 0);
|
||||||
if (nelem > 0)
|
if (nelem > 0)
|
||||||
{
|
{
|
||||||
|
@ -6593,13 +6599,8 @@ static void usage(void)
|
||||||
if (!default_collation_name)
|
if (!default_collation_name)
|
||||||
default_collation_name= (char*) default_charset_info->name;
|
default_collation_name= (char*) default_charset_info->name;
|
||||||
print_version();
|
print_version();
|
||||||
puts("\
|
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||||
Copyright (C) 2000-2008 MySQL AB, by Monty and others.\n\
|
puts("Starts the MySQL database server.\n");
|
||||||
Copyright (C) 2008,2009 Sun Microsystems, Inc.\n\
|
|
||||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
|
|
||||||
and you are welcome to modify and redistribute it under the GPL license\n\n\
|
|
||||||
Starts the MySQL database server.\n");
|
|
||||||
|
|
||||||
printf("Usage: %s [OPTIONS]\n", my_progname);
|
printf("Usage: %s [OPTIONS]\n", my_progname);
|
||||||
if (!opt_verbose)
|
if (!opt_verbose)
|
||||||
puts("\nFor more help options (several pages), use mysqld --verbose --help.");
|
puts("\nFor more help options (several pages), use mysqld --verbose --help.");
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#define SLAVE_ERRMSG_SIZE (FN_REFLEN+64)
|
#define SLAVE_ERRMSG_SIZE (FN_REFLEN+64)
|
||||||
|
|
||||||
|
|
||||||
RPL_STATUS rpl_status=RPL_NULL;
|
ulong rpl_status=RPL_NULL;
|
||||||
mysql_mutex_t LOCK_rpl_status;
|
mysql_mutex_t LOCK_rpl_status;
|
||||||
mysql_cond_t COND_rpl_status;
|
mysql_cond_t COND_rpl_status;
|
||||||
HASH slave_list;
|
HASH slave_list;
|
||||||
|
@ -68,7 +68,7 @@ static Slave_log_event* find_slave_event(IO_CACHE* log,
|
||||||
functions like register_slave()) are working.
|
functions like register_slave()) are working.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void change_rpl_status(RPL_STATUS from_status, RPL_STATUS to_status)
|
void change_rpl_status(ulong from_status, ulong to_status)
|
||||||
{
|
{
|
||||||
mysql_mutex_lock(&LOCK_rpl_status);
|
mysql_mutex_lock(&LOCK_rpl_status);
|
||||||
if (rpl_status == from_status || rpl_status == RPL_ANY)
|
if (rpl_status == from_status || rpl_status == RPL_ANY)
|
||||||
|
|
|
@ -26,7 +26,7 @@ typedef enum {RPL_AUTH_MASTER=0,RPL_IDLE_SLAVE,RPL_ACTIVE_SLAVE,
|
||||||
RPL_LOST_SOLDIER,RPL_TROOP_SOLDIER,
|
RPL_LOST_SOLDIER,RPL_TROOP_SOLDIER,
|
||||||
RPL_RECOVERY_CAPTAIN,RPL_NULL /* inactive */,
|
RPL_RECOVERY_CAPTAIN,RPL_NULL /* inactive */,
|
||||||
RPL_ANY /* wild card used by change_rpl_status */ } RPL_STATUS;
|
RPL_ANY /* wild card used by change_rpl_status */ } RPL_STATUS;
|
||||||
extern RPL_STATUS rpl_status;
|
extern ulong rpl_status;
|
||||||
|
|
||||||
extern mysql_mutex_t LOCK_rpl_status;
|
extern mysql_mutex_t LOCK_rpl_status;
|
||||||
extern mysql_cond_t COND_rpl_status;
|
extern mysql_cond_t COND_rpl_status;
|
||||||
|
@ -34,7 +34,7 @@ extern TYPELIB rpl_role_typelib;
|
||||||
extern const char* rpl_role_type[], *rpl_status_type[];
|
extern const char* rpl_role_type[], *rpl_status_type[];
|
||||||
|
|
||||||
pthread_handler_t handle_failsafe_rpl(void *arg);
|
pthread_handler_t handle_failsafe_rpl(void *arg);
|
||||||
void change_rpl_status(RPL_STATUS from_status, RPL_STATUS to_status);
|
void change_rpl_status(ulong from_status, ulong to_status);
|
||||||
int find_recovery_captain(THD* thd, MYSQL* mysql);
|
int find_recovery_captain(THD* thd, MYSQL* mysql);
|
||||||
int update_slave_list(MYSQL* mysql, Master_info* mi);
|
int update_slave_list(MYSQL* mysql, Master_info* mi);
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,13 @@ struct scheduler_functions
|
||||||
*/
|
*/
|
||||||
enum scheduler_types
|
enum scheduler_types
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
The default of --thread-handling is the first one in the
|
||||||
|
thread_handling_names array, this array has to be consistent with
|
||||||
|
the order in this array, so to change default one has to change
|
||||||
|
the first entry in this enum and the first entry in the
|
||||||
|
thread_handling_names array.
|
||||||
|
*/
|
||||||
SCHEDULER_ONE_THREAD_PER_CONNECTION=0,
|
SCHEDULER_ONE_THREAD_PER_CONNECTION=0,
|
||||||
SCHEDULER_NO_THREADS,
|
SCHEDULER_NO_THREADS,
|
||||||
SCHEDULER_TYPES_COUNT
|
SCHEDULER_TYPES_COUNT
|
||||||
|
|
|
@ -6152,7 +6152,7 @@ ER_WARN_ENGINE_TRANSACTION_ROLLBACK
|
||||||
ER_SLAVE_HEARTBEAT_FAILURE
|
ER_SLAVE_HEARTBEAT_FAILURE
|
||||||
eng "Unexpected master's heartbeat data: %s"
|
eng "Unexpected master's heartbeat data: %s"
|
||||||
ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE
|
ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE
|
||||||
eng "The requested value for the heartbeat period %s %s"
|
eng "The requested value for the heartbeat period is either negative or exceeds the maximum allowed (%s seconds)."
|
||||||
|
|
||||||
ER_NDB_REPLICATION_SCHEMA_ERROR
|
ER_NDB_REPLICATION_SCHEMA_ERROR
|
||||||
eng "Bad schema for mysql.ndb_replication table. Message: %-.64s"
|
eng "Bad schema for mysql.ndb_replication table. Message: %-.64s"
|
||||||
|
@ -6379,3 +6379,16 @@ ER_SET_PASSWORD_AUTH_PLUGIN
|
||||||
|
|
||||||
ER_GRANT_PLUGIN_USER_EXISTS
|
ER_GRANT_PLUGIN_USER_EXISTS
|
||||||
eng "GRANT with IDENTIFIED WITH is illegal because the user %-.*s already exists"
|
eng "GRANT with IDENTIFIED WITH is illegal because the user %-.*s already exists"
|
||||||
|
|
||||||
|
ER_TRUNCATE_ILLEGAL_FK 42000
|
||||||
|
eng "Cannot truncate a table referenced in a foreign key constraint (%.192s)"
|
||||||
|
|
||||||
|
ER_PLUGIN_IS_PERMANENT
|
||||||
|
eng "Plugin '%s' is force_plus_permanent and can not be unloaded"
|
||||||
|
|
||||||
|
ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MIN
|
||||||
|
eng "The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled."
|
||||||
|
|
||||||
|
ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE_MAX
|
||||||
|
eng "The requested value for the heartbeat period exceeds the value of `slave_net_timeout' seconds. A sensible value for the period should be less than the timeout."
|
||||||
|
|
||||||
|
|
|
@ -2534,9 +2534,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
exec_res= 0;
|
exec_res= 0;
|
||||||
trans_rollback(thd);
|
rli->cleanup_context(thd, 1);
|
||||||
close_thread_tables(thd);
|
|
||||||
thd->mdl_context.release_transactional_locks();
|
|
||||||
/* chance for concurrent connection to get more locks */
|
/* chance for concurrent connection to get more locks */
|
||||||
safe_sleep(thd, min(rli->trans_retries, MAX_SLAVE_RETRY_PAUSE),
|
safe_sleep(thd, min(rli->trans_retries, MAX_SLAVE_RETRY_PAUSE),
|
||||||
(CHECK_KILLED_FUNC)sql_slave_killed, (void*)rli);
|
(CHECK_KILLED_FUNC)sql_slave_killed, (void*)rli);
|
||||||
|
@ -3385,6 +3383,7 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \
|
||||||
request is detected only by the present function, not by events), so we
|
request is detected only by the present function, not by events), so we
|
||||||
must "proactively" clear playgrounds:
|
must "proactively" clear playgrounds:
|
||||||
*/
|
*/
|
||||||
|
thd->clear_error();
|
||||||
rli->cleanup_context(thd, 1);
|
rli->cleanup_context(thd, 1);
|
||||||
/*
|
/*
|
||||||
Some extra safety, which should not been needed (normally, event deletion
|
Some extra safety, which should not been needed (normally, event deletion
|
||||||
|
|
|
@ -1213,8 +1213,28 @@ sp_head::execute(THD *thd)
|
||||||
Object_creation_ctx *saved_creation_ctx;
|
Object_creation_ctx *saved_creation_ctx;
|
||||||
Warning_info *saved_warning_info, warning_info(thd->warning_info->warn_id());
|
Warning_info *saved_warning_info, warning_info(thd->warning_info->warn_id());
|
||||||
|
|
||||||
/* Use some extra margin for possible SP recursion and functions */
|
/*
|
||||||
if (check_stack_overrun(thd, 8 * STACK_MIN_SIZE, (uchar*)&old_packet))
|
Just reporting a stack overrun error
|
||||||
|
(@sa check_stack_overrun()) requires stack memory for error
|
||||||
|
message buffer. Thus, we have to put the below check
|
||||||
|
relatively close to the beginning of the execution stack,
|
||||||
|
where available stack margin is still big. As long as the check
|
||||||
|
has to be fairly high up the call stack, the amount of memory
|
||||||
|
we "book" for has to stay fairly high as well, and hence
|
||||||
|
not very accurate. The number below has been calculated
|
||||||
|
by trial and error, and reflects the amount of memory necessary
|
||||||
|
to execute a single stored procedure instruction, be it either
|
||||||
|
an SQL statement, or, heaviest of all, a CALL, which involves
|
||||||
|
parsing and loading of another stored procedure into the cache
|
||||||
|
(@sa db_load_routine() and Bug#10100).
|
||||||
|
At the time of measuring, a recursive SP invocation required
|
||||||
|
3232 bytes of stack on 32 bit Linux, 6016 bytes on 64 bit Mac
|
||||||
|
and 11152 on 64 bit Solaris sparc.
|
||||||
|
The same with db_load_routine() required circa 7k bytes and
|
||||||
|
14k bytes accordingly. Hence, here we book the stack with some
|
||||||
|
reasonable margin.
|
||||||
|
*/
|
||||||
|
if (check_stack_overrun(thd, 4 * STACK_MIN_SIZE, (uchar*)&old_packet))
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
|
|
||||||
/* init per-instruction memroot */
|
/* init per-instruction memroot */
|
||||||
|
|
|
@ -3936,7 +3936,7 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
|
||||||
ulong rights, bool revoke_grant, bool is_proxy)
|
ulong rights, bool revoke_grant, bool is_proxy)
|
||||||
{
|
{
|
||||||
List_iterator <LEX_USER> str_list (list);
|
List_iterator <LEX_USER> str_list (list);
|
||||||
LEX_USER *Str, *tmp_Str, *proxied_user;
|
LEX_USER *Str, *tmp_Str, *proxied_user= NULL;
|
||||||
char tmp_db[NAME_LEN+1];
|
char tmp_db[NAME_LEN+1];
|
||||||
bool create_new_users=0;
|
bool create_new_users=0;
|
||||||
TABLE_LIST tables[2];
|
TABLE_LIST tables[2];
|
||||||
|
|
114
sql/sql_cache.cc
114
sql/sql_cache.cc
|
@ -334,6 +334,7 @@ TODO list:
|
||||||
#include "tztime.h" // struct Time_zone
|
#include "tztime.h" // struct Time_zone
|
||||||
#include "sql_acl.h" // SELECT_ACL
|
#include "sql_acl.h" // SELECT_ACL
|
||||||
#include "sql_base.h" // TMP_TABLE_KEY_EXTRA
|
#include "sql_base.h" // TMP_TABLE_KEY_EXTRA
|
||||||
|
#include "debug_sync.h" // DEBUG_SYNC
|
||||||
#ifdef HAVE_QUERY_CACHE
|
#ifdef HAVE_QUERY_CACHE
|
||||||
#include <m_ctype.h>
|
#include <m_ctype.h>
|
||||||
#include <my_dir.h>
|
#include <my_dir.h>
|
||||||
|
@ -341,6 +342,7 @@ TODO list:
|
||||||
#include "../storage/myisammrg/ha_myisammrg.h"
|
#include "../storage/myisammrg/ha_myisammrg.h"
|
||||||
#include "../storage/myisammrg/myrg_def.h"
|
#include "../storage/myisammrg/myrg_def.h"
|
||||||
#include "probes_mysql.h"
|
#include "probes_mysql.h"
|
||||||
|
#include "transaction.h"
|
||||||
|
|
||||||
#ifdef EMBEDDED_LIBRARY
|
#ifdef EMBEDDED_LIBRARY
|
||||||
#include "emb_qcache.h"
|
#include "emb_qcache.h"
|
||||||
|
@ -370,32 +372,6 @@ TODO list:
|
||||||
__LINE__,(ulong)(B)));B->query()->unlock_reading();}
|
__LINE__,(ulong)(B)));B->query()->unlock_reading();}
|
||||||
#define DUMP(C) DBUG_EXECUTE("qcache", {\
|
#define DUMP(C) DBUG_EXECUTE("qcache", {\
|
||||||
(C)->cache_dump(); (C)->queries_dump();(C)->tables_dump();})
|
(C)->cache_dump(); (C)->queries_dump();(C)->tables_dump();})
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
Causes the thread to wait in a spin lock for a query kill signal.
|
|
||||||
This function is used by the test frame work to identify race conditions.
|
|
||||||
|
|
||||||
The signal is caught and ignored and the thread is not killed.
|
|
||||||
*/
|
|
||||||
|
|
||||||
static void debug_wait_for_kill(const char *info)
|
|
||||||
{
|
|
||||||
DBUG_ENTER("debug_wait_for_kill");
|
|
||||||
const char *prev_info;
|
|
||||||
THD *thd;
|
|
||||||
thd= current_thd;
|
|
||||||
prev_info= thd->proc_info;
|
|
||||||
thd->proc_info= info;
|
|
||||||
sql_print_information("%s", info);
|
|
||||||
while(!thd->killed)
|
|
||||||
my_sleep(1000);
|
|
||||||
thd->killed= THD::NOT_KILLED;
|
|
||||||
sql_print_information("Exit debug_wait_for_kill");
|
|
||||||
thd->proc_info= prev_info;
|
|
||||||
DBUG_VOID_RETURN;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define RW_WLOCK(M) mysql_rwlock_wrlock(M)
|
#define RW_WLOCK(M) mysql_rwlock_wrlock(M)
|
||||||
#define RW_RLOCK(M) mysql_rwlock_rdlock(M)
|
#define RW_RLOCK(M) mysql_rwlock_rdlock(M)
|
||||||
|
@ -407,6 +383,52 @@ static void debug_wait_for_kill(const char *info)
|
||||||
#define DUMP(C)
|
#define DUMP(C)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Macro that executes the requested action at a synchronization point
|
||||||
|
only if the thread has a associated THD session.
|
||||||
|
*/
|
||||||
|
#if defined(ENABLED_DEBUG_SYNC)
|
||||||
|
#define QC_DEBUG_SYNC(name) \
|
||||||
|
do { \
|
||||||
|
THD *thd= current_thd; \
|
||||||
|
if (thd) \
|
||||||
|
DEBUG_SYNC(thd, name); \
|
||||||
|
} while (0)
|
||||||
|
#else
|
||||||
|
#define QC_DEBUG_SYNC(name)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
Thread state to be used when the query cache lock needs to be acquired.
|
||||||
|
Sets the thread state name in the constructor, resets on destructor.
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct Query_cache_wait_state
|
||||||
|
{
|
||||||
|
THD *m_thd;
|
||||||
|
const char *m_proc_info;
|
||||||
|
|
||||||
|
Query_cache_wait_state(THD *thd, const char *func,
|
||||||
|
const char *file, unsigned int line)
|
||||||
|
: m_thd(thd),
|
||||||
|
m_proc_info(NULL)
|
||||||
|
{
|
||||||
|
if (m_thd)
|
||||||
|
m_proc_info= set_thd_proc_info(m_thd,
|
||||||
|
"Waiting for query cache lock",
|
||||||
|
func, file, line);
|
||||||
|
}
|
||||||
|
|
||||||
|
~Query_cache_wait_state()
|
||||||
|
{
|
||||||
|
if (m_thd)
|
||||||
|
set_thd_proc_info(m_thd, m_proc_info, NULL, NULL, 0);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Serialize access to the query cache.
|
Serialize access to the query cache.
|
||||||
If the lock cannot be granted the thread hangs in a conditional wait which
|
If the lock cannot be granted the thread hangs in a conditional wait which
|
||||||
|
@ -428,6 +450,8 @@ static void debug_wait_for_kill(const char *info)
|
||||||
bool Query_cache::try_lock(bool use_timeout)
|
bool Query_cache::try_lock(bool use_timeout)
|
||||||
{
|
{
|
||||||
bool interrupt= FALSE;
|
bool interrupt= FALSE;
|
||||||
|
THD *thd= current_thd;
|
||||||
|
Query_cache_wait_state wait_state(thd, __func__, __FILE__, __LINE__);
|
||||||
DBUG_ENTER("Query_cache::try_lock");
|
DBUG_ENTER("Query_cache::try_lock");
|
||||||
|
|
||||||
mysql_mutex_lock(&structure_guard_mutex);
|
mysql_mutex_lock(&structure_guard_mutex);
|
||||||
|
@ -437,7 +461,6 @@ bool Query_cache::try_lock(bool use_timeout)
|
||||||
{
|
{
|
||||||
m_cache_lock_status= Query_cache::LOCKED;
|
m_cache_lock_status= Query_cache::LOCKED;
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
THD *thd= current_thd;
|
|
||||||
if (thd)
|
if (thd)
|
||||||
m_cache_lock_thread_id= thd->thread_id;
|
m_cache_lock_thread_id= thd->thread_id;
|
||||||
#endif
|
#endif
|
||||||
|
@ -496,6 +519,8 @@ bool Query_cache::try_lock(bool use_timeout)
|
||||||
|
|
||||||
void Query_cache::lock_and_suspend(void)
|
void Query_cache::lock_and_suspend(void)
|
||||||
{
|
{
|
||||||
|
THD *thd= current_thd;
|
||||||
|
Query_cache_wait_state wait_state(thd, __func__, __FILE__, __LINE__);
|
||||||
DBUG_ENTER("Query_cache::lock_and_suspend");
|
DBUG_ENTER("Query_cache::lock_and_suspend");
|
||||||
|
|
||||||
mysql_mutex_lock(&structure_guard_mutex);
|
mysql_mutex_lock(&structure_guard_mutex);
|
||||||
|
@ -503,7 +528,6 @@ void Query_cache::lock_and_suspend(void)
|
||||||
mysql_cond_wait(&COND_cache_status_changed, &structure_guard_mutex);
|
mysql_cond_wait(&COND_cache_status_changed, &structure_guard_mutex);
|
||||||
m_cache_lock_status= Query_cache::LOCKED_NO_WAIT;
|
m_cache_lock_status= Query_cache::LOCKED_NO_WAIT;
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
THD *thd= current_thd;
|
|
||||||
if (thd)
|
if (thd)
|
||||||
m_cache_lock_thread_id= thd->thread_id;
|
m_cache_lock_thread_id= thd->thread_id;
|
||||||
#endif
|
#endif
|
||||||
|
@ -524,6 +548,8 @@ void Query_cache::lock_and_suspend(void)
|
||||||
|
|
||||||
void Query_cache::lock(void)
|
void Query_cache::lock(void)
|
||||||
{
|
{
|
||||||
|
THD *thd= current_thd;
|
||||||
|
Query_cache_wait_state wait_state(thd, __func__, __FILE__, __LINE__);
|
||||||
DBUG_ENTER("Query_cache::lock");
|
DBUG_ENTER("Query_cache::lock");
|
||||||
|
|
||||||
mysql_mutex_lock(&structure_guard_mutex);
|
mysql_mutex_lock(&structure_guard_mutex);
|
||||||
|
@ -531,7 +557,6 @@ void Query_cache::lock(void)
|
||||||
mysql_cond_wait(&COND_cache_status_changed, &structure_guard_mutex);
|
mysql_cond_wait(&COND_cache_status_changed, &structure_guard_mutex);
|
||||||
m_cache_lock_status= Query_cache::LOCKED;
|
m_cache_lock_status= Query_cache::LOCKED;
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
THD *thd= current_thd;
|
|
||||||
if (thd)
|
if (thd)
|
||||||
m_cache_lock_thread_id= thd->thread_id;
|
m_cache_lock_thread_id= thd->thread_id;
|
||||||
#endif
|
#endif
|
||||||
|
@ -871,9 +896,7 @@ Query_cache::insert(Query_cache_tls *query_cache_tls,
|
||||||
if (is_disabled() || query_cache_tls->first_query_block == NULL)
|
if (is_disabled() || query_cache_tls->first_query_block == NULL)
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
|
|
||||||
DBUG_EXECUTE_IF("wait_in_query_cache_insert",
|
QC_DEBUG_SYNC("wait_in_query_cache_insert");
|
||||||
debug_wait_for_kill("wait_in_query_cache_insert"); );
|
|
||||||
|
|
||||||
|
|
||||||
if (try_lock())
|
if (try_lock())
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
|
@ -1683,6 +1706,8 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
thd->lex->safe_to_cache_query= 0; // Don't try to cache this
|
thd->lex->safe_to_cache_query= 0; // Don't try to cache this
|
||||||
|
/* End the statement transaction potentially started by engine. */
|
||||||
|
trans_rollback_stmt(thd);
|
||||||
goto err_unlock; // Parse query
|
goto err_unlock; // Parse query
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1724,6 +1749,13 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
||||||
|
|
||||||
thd->limit_found_rows = query->found_rows();
|
thd->limit_found_rows = query->found_rows();
|
||||||
thd->status_var.last_query_cost= 0.0;
|
thd->status_var.last_query_cost= 0.0;
|
||||||
|
/*
|
||||||
|
End the statement transaction potentially started by an
|
||||||
|
engine callback. We ignore the return value for now,
|
||||||
|
since as long as EOF packet is part of the query cache
|
||||||
|
response, we can't handle it anyway.
|
||||||
|
*/
|
||||||
|
(void) trans_commit_stmt(thd);
|
||||||
if (!thd->stmt_da->is_set())
|
if (!thd->stmt_da->is_set())
|
||||||
thd->stmt_da->disable_status();
|
thd->stmt_da->disable_status();
|
||||||
|
|
||||||
|
@ -1769,8 +1801,7 @@ void Query_cache::invalidate(THD *thd, TABLE_LIST *tables_used,
|
||||||
invalidate_table(thd, tables_used);
|
invalidate_table(thd, tables_used);
|
||||||
}
|
}
|
||||||
|
|
||||||
DBUG_EXECUTE_IF("wait_after_query_cache_invalidate",
|
DEBUG_SYNC(thd, "wait_after_query_cache_invalidate");
|
||||||
debug_wait_for_kill("wait_after_query_cache_invalidate"););
|
|
||||||
|
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
@ -1961,8 +1992,7 @@ void Query_cache::flush()
|
||||||
if (is_disabled())
|
if (is_disabled())
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
|
|
||||||
DBUG_EXECUTE_IF("wait_in_query_cache_flush1",
|
QC_DEBUG_SYNC("wait_in_query_cache_flush1");
|
||||||
debug_wait_for_kill("wait_in_query_cache_flush1"););
|
|
||||||
|
|
||||||
lock_and_suspend();
|
lock_and_suspend();
|
||||||
if (query_cache_size > 0)
|
if (query_cache_size > 0)
|
||||||
|
@ -2302,9 +2332,7 @@ void Query_cache::free_cache()
|
||||||
|
|
||||||
void Query_cache::flush_cache()
|
void Query_cache::flush_cache()
|
||||||
{
|
{
|
||||||
|
QC_DEBUG_SYNC("wait_in_query_cache_flush2");
|
||||||
DBUG_EXECUTE_IF("wait_in_query_cache_flush2",
|
|
||||||
debug_wait_for_kill("wait_in_query_cache_flush2"););
|
|
||||||
|
|
||||||
my_hash_reset(&queries);
|
my_hash_reset(&queries);
|
||||||
while (queries_blocks != 0)
|
while (queries_blocks != 0)
|
||||||
|
@ -2750,8 +2778,7 @@ void Query_cache::invalidate_table(THD *thd, TABLE *table)
|
||||||
|
|
||||||
void Query_cache::invalidate_table(THD *thd, uchar * key, uint32 key_length)
|
void Query_cache::invalidate_table(THD *thd, uchar * key, uint32 key_length)
|
||||||
{
|
{
|
||||||
DBUG_EXECUTE_IF("wait_in_query_cache_invalidate1",
|
DEBUG_SYNC(thd, "wait_in_query_cache_invalidate1");
|
||||||
debug_wait_for_kill("wait_in_query_cache_invalidate1"); );
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Lock the query cache and queue all invalidation attempts to avoid
|
Lock the query cache and queue all invalidation attempts to avoid
|
||||||
|
@ -2759,9 +2786,7 @@ void Query_cache::invalidate_table(THD *thd, uchar * key, uint32 key_length)
|
||||||
*/
|
*/
|
||||||
lock();
|
lock();
|
||||||
|
|
||||||
DBUG_EXECUTE_IF("wait_in_query_cache_invalidate2",
|
DEBUG_SYNC(thd, "wait_in_query_cache_invalidate2");
|
||||||
debug_wait_for_kill("wait_in_query_cache_invalidate2"); );
|
|
||||||
|
|
||||||
|
|
||||||
if (query_cache_size > 0)
|
if (query_cache_size > 0)
|
||||||
invalidate_table_internal(thd, key, key_length);
|
invalidate_table_internal(thd, key, key_length);
|
||||||
|
@ -2811,7 +2836,6 @@ Query_cache::invalidate_query_block_list(THD *thd,
|
||||||
Query_cache_block *query_block= list_root->next->block();
|
Query_cache_block *query_block= list_root->next->block();
|
||||||
BLOCK_LOCK_WR(query_block);
|
BLOCK_LOCK_WR(query_block);
|
||||||
free_query(query_block);
|
free_query(query_block);
|
||||||
DBUG_EXECUTE_IF("debug_cache_locks", sleep(10););
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -525,9 +525,7 @@ int mysql_multi_delete_prepare(THD *thd)
|
||||||
if (!(target_tbl->table= target_tbl->correspondent_table->table))
|
if (!(target_tbl->table= target_tbl->correspondent_table->table))
|
||||||
{
|
{
|
||||||
DBUG_ASSERT(target_tbl->correspondent_table->view &&
|
DBUG_ASSERT(target_tbl->correspondent_table->view &&
|
||||||
target_tbl->correspondent_table->merge_underlying_list &&
|
target_tbl->correspondent_table->multitable_view);
|
||||||
target_tbl->correspondent_table->merge_underlying_list->
|
|
||||||
next_local);
|
|
||||||
my_error(ER_VIEW_DELETE_MERGE_VIEW, MYF(0),
|
my_error(ER_VIEW_DELETE_MERGE_VIEW, MYF(0),
|
||||||
target_tbl->correspondent_table->view_db.str,
|
target_tbl->correspondent_table->view_db.str,
|
||||||
target_tbl->correspondent_table->view_name.str);
|
target_tbl->correspondent_table->view_name.str);
|
||||||
|
|
|
@ -1620,9 +1620,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
|
||||||
table->file->adjust_next_insert_id_after_explicit_value(
|
table->file->adjust_next_insert_id_after_explicit_value(
|
||||||
table->next_number_field->val_int());
|
table->next_number_field->val_int());
|
||||||
info->touched++;
|
info->touched++;
|
||||||
if ((table->file->ha_table_flags() & HA_PARTIAL_COLUMN_READ &&
|
if (!records_are_comparable(table) || compare_records(table))
|
||||||
!bitmap_is_subset(table->write_set, table->read_set)) ||
|
|
||||||
compare_record(table))
|
|
||||||
{
|
{
|
||||||
if ((error=table->file->ha_update_row(table->record[1],
|
if ((error=table->file->ha_update_row(table->record[1],
|
||||||
table->record[0])) &&
|
table->record[0])) &&
|
||||||
|
|
|
@ -958,6 +958,7 @@ inline bool st_select_lex_unit::is_union ()
|
||||||
#define ALTER_ALL_PARTITION (1L << 21)
|
#define ALTER_ALL_PARTITION (1L << 21)
|
||||||
#define ALTER_REMOVE_PARTITIONING (1L << 22)
|
#define ALTER_REMOVE_PARTITIONING (1L << 22)
|
||||||
#define ALTER_FOREIGN_KEY (1L << 23)
|
#define ALTER_FOREIGN_KEY (1L << 23)
|
||||||
|
#define ALTER_TRUNCATE_PARTITION (1L << 24)
|
||||||
|
|
||||||
enum enum_alter_table_change_level
|
enum enum_alter_table_change_level
|
||||||
{
|
{
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "sql_locale.h" // my_locale_en_US
|
#include "sql_locale.h" // my_locale_en_US
|
||||||
#include "log.h" // flush_error_log
|
#include "log.h" // flush_error_log
|
||||||
#include "sql_view.h" // mysql_create_view, mysql_drop_view
|
#include "sql_view.h" // mysql_create_view, mysql_drop_view
|
||||||
#include "sql_delete.h" // mysql_truncate, mysql_delete
|
#include "sql_delete.h" // mysql_delete
|
||||||
#include "sql_insert.h" // mysql_insert
|
#include "sql_insert.h" // mysql_insert
|
||||||
#include "sql_update.h" // mysql_update, mysql_multi_update
|
#include "sql_update.h" // mysql_update, mysql_multi_update
|
||||||
#include "sql_partition.h" // struct partition_info
|
#include "sql_partition.h" // struct partition_info
|
||||||
|
@ -49,7 +49,6 @@
|
||||||
// mysql_recreate_table,
|
// mysql_recreate_table,
|
||||||
// mysql_backup_table,
|
// mysql_backup_table,
|
||||||
// mysql_restore_table
|
// mysql_restore_table
|
||||||
#include "sql_truncate.h" // mysql_truncate_table
|
|
||||||
#include "sql_reload.h" // reload_acl_and_cache
|
#include "sql_reload.h" // reload_acl_and_cache
|
||||||
#include "sql_admin.h" // mysql_assign_to_keycache
|
#include "sql_admin.h" // mysql_assign_to_keycache
|
||||||
#include "sql_connect.h" // check_user,
|
#include "sql_connect.h" // check_user,
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
#include "sql_parse.h" // check_one_table_access
|
#include "sql_parse.h" // check_one_table_access
|
||||||
#include "sql_table.h" // mysql_alter_table, etc.
|
#include "sql_table.h" // mysql_alter_table, etc.
|
||||||
#include "sql_lex.h" // Sql_statement
|
#include "sql_lex.h" // Sql_statement
|
||||||
#include "sql_truncate.h" // mysql_truncate_table,
|
|
||||||
// Truncate_statement
|
|
||||||
#include "sql_admin.h" // Analyze/Check/.._table_statement
|
#include "sql_admin.h" // Analyze/Check/.._table_statement
|
||||||
#include "sql_partition_admin.h" // Alter_table_*_partition
|
#include "sql_partition_admin.h" // Alter_table_*_partition
|
||||||
|
#include "ha_partition.h" // ha_partition
|
||||||
|
#include "sql_base.h" // open_and_lock_tables
|
||||||
|
|
||||||
#ifndef WITH_PARTITION_STORAGE_ENGINE
|
#ifndef WITH_PARTITION_STORAGE_ENGINE
|
||||||
|
|
||||||
|
@ -104,36 +104,85 @@ bool Alter_table_repair_partition_statement::execute(THD *thd)
|
||||||
|
|
||||||
bool Alter_table_truncate_partition_statement::execute(THD *thd)
|
bool Alter_table_truncate_partition_statement::execute(THD *thd)
|
||||||
{
|
{
|
||||||
|
int error;
|
||||||
|
ha_partition *partition;
|
||||||
|
ulong timeout= thd->variables.lock_wait_timeout;
|
||||||
TABLE_LIST *first_table= thd->lex->select_lex.table_list.first;
|
TABLE_LIST *first_table= thd->lex->select_lex.table_list.first;
|
||||||
bool res;
|
|
||||||
enum_sql_command original_sql_command;
|
|
||||||
DBUG_ENTER("Alter_table_truncate_partition_statement::execute");
|
DBUG_ENTER("Alter_table_truncate_partition_statement::execute");
|
||||||
|
|
||||||
/*
|
|
||||||
Execute TRUNCATE PARTITION just like TRUNCATE TABLE.
|
|
||||||
Some storage engines (InnoDB, partition) checks thd_sql_command,
|
|
||||||
so we set it to SQLCOM_TRUNCATE during the execution.
|
|
||||||
*/
|
|
||||||
original_sql_command= m_lex->sql_command;
|
|
||||||
m_lex->sql_command= SQLCOM_TRUNCATE;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Flag that it is an ALTER command which administrates partitions, used
|
Flag that it is an ALTER command which administrates partitions, used
|
||||||
by ha_partition.
|
by ha_partition.
|
||||||
*/
|
*/
|
||||||
m_lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
|
m_lex->alter_info.flags|= ALTER_ADMIN_PARTITION |
|
||||||
|
ALTER_TRUNCATE_PARTITION;
|
||||||
|
|
||||||
|
/* Fix the lock types (not the same as ordinary ALTER TABLE). */
|
||||||
|
first_table->lock_type= TL_WRITE;
|
||||||
|
first_table->mdl_request.set_type(MDL_EXCLUSIVE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Fix the lock types (not the same as ordinary ALTER TABLE).
|
Check table permissions and open it with a exclusive lock.
|
||||||
|
Ensure it is a partitioned table and finally, upcast the
|
||||||
|
handler and invoke the partition truncate method. Lastly,
|
||||||
|
write the statement to the binary log if necessary.
|
||||||
*/
|
*/
|
||||||
first_table->lock_type= TL_WRITE;
|
|
||||||
first_table->mdl_request.set_type(MDL_SHARED_NO_READ_WRITE);
|
|
||||||
|
|
||||||
/* execute as a TRUNCATE TABLE */
|
if (check_one_table_access(thd, DROP_ACL, first_table))
|
||||||
res= Truncate_statement::execute(thd);
|
DBUG_RETURN(TRUE);
|
||||||
|
|
||||||
m_lex->sql_command= original_sql_command;
|
if (open_and_lock_tables(thd, first_table, FALSE, 0))
|
||||||
DBUG_RETURN(res);
|
DBUG_RETURN(TRUE);
|
||||||
|
|
||||||
|
/*
|
||||||
|
TODO: Add support for TRUNCATE PARTITION for NDB and other
|
||||||
|
engines supporting native partitioning.
|
||||||
|
*/
|
||||||
|
if (first_table->table->s->db_type() != partition_hton)
|
||||||
|
{
|
||||||
|
my_error(ER_PARTITION_MGMT_ON_NONPARTITIONED, MYF(0));
|
||||||
|
DBUG_RETURN(TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Under locked table modes this might still not be an exclusive
|
||||||
|
lock. Hence, upgrade the lock since the handler truncate method
|
||||||
|
mandates an exclusive metadata lock.
|
||||||
|
*/
|
||||||
|
MDL_ticket *ticket= first_table->table->mdl_ticket;
|
||||||
|
if (thd->mdl_context.upgrade_shared_lock_to_exclusive(ticket, timeout))
|
||||||
|
DBUG_RETURN(TRUE);
|
||||||
|
|
||||||
|
tdc_remove_table(thd, TDC_RT_REMOVE_NOT_OWN, first_table->db,
|
||||||
|
first_table->table_name, FALSE);
|
||||||
|
|
||||||
|
partition= (ha_partition *) first_table->table->file;
|
||||||
|
|
||||||
|
/* Invoke the handler method responsible for truncating the partition. */
|
||||||
|
if ((error= partition->truncate_partition(&thd->lex->alter_info)))
|
||||||
|
first_table->table->file->print_error(error, MYF(0));
|
||||||
|
|
||||||
|
/*
|
||||||
|
All effects of a truncate operation are committed even if the
|
||||||
|
operation fails. Thus, the query must be written to the binary
|
||||||
|
log. The only exception is a unimplemented truncate method. Also,
|
||||||
|
it is logged in statement format, regardless of the binlog format.
|
||||||
|
*/
|
||||||
|
if (error != HA_ERR_WRONG_COMMAND)
|
||||||
|
error|= write_bin_log(thd, !error, thd->query(), thd->query_length());
|
||||||
|
|
||||||
|
/*
|
||||||
|
A locked table ticket was upgraded to a exclusive lock. After the
|
||||||
|
the query has been written to the binary log, downgrade the lock
|
||||||
|
to a shared one.
|
||||||
|
*/
|
||||||
|
if (thd->locked_tables_mode)
|
||||||
|
ticket->downgrade_exclusive_lock(MDL_SHARED_NO_READ_WRITE);
|
||||||
|
|
||||||
|
if (! error)
|
||||||
|
my_ok(thd);
|
||||||
|
|
||||||
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* WITH_PARTITION_STORAGE_ENGINE */
|
#endif /* WITH_PARTITION_STORAGE_ENGINE */
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue