mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +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
|
||||
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
|
||||
* Commands compatible with mSQL by David J. Hughes
|
||||
*
|
||||
|
@ -110,6 +105,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#include "completion_hash.h"
|
||||
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||
|
||||
#define PROMPT_CHAR '\\'
|
||||
#define DEFAULT_DELIMITER ";"
|
||||
|
@ -1177,7 +1173,7 @@ int main(int argc,char *argv[])
|
|||
mysql_thread_id(&mysql), server_version_string(&mysql));
|
||||
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
|
||||
initialize_readline((char*) my_progname);
|
||||
|
@ -1595,7 +1591,7 @@ static void usage(int version)
|
|||
|
||||
if (version)
|
||||
return;
|
||||
printf("%s", COPYRIGHT_NOTICE);
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||
printf("Usage: %s [OPTIONS] [database]\n", my_progname);
|
||||
my_print_help(my_long_options);
|
||||
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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -17,6 +17,8 @@
|
|||
#include <sslopt-vars.h>
|
||||
#include "../scripts/mysql_fix_privilege_tables_sql.c"
|
||||
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
#define VER "1.1"
|
||||
|
||||
#ifdef HAVE_SYS_WAIT_H
|
||||
|
@ -232,6 +234,7 @@ get_one_option(int optid, const struct my_option *opt,
|
|||
case '?':
|
||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",
|
||||
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");
|
||||
my_print_help(my_long_options);
|
||||
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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -23,6 +23,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <mysql.h>
|
||||
#include <sql_common.h>
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
#define ADMIN_VERSION "8.42"
|
||||
#define MAX_MYSQL_VAR 512
|
||||
|
@ -671,8 +672,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
|||
case ADMIN_VER:
|
||||
new_line=1;
|
||||
print_version();
|
||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
|
||||
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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||
printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
|
||||
printf("Protocol version\t%d\n", mysql_get_proto_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)
|
||||
{
|
||||
print_version();
|
||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
|
||||
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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||
puts("Administration program for the mysqld daemon.");
|
||||
printf("Usage: %s [OPTIONS] command command....\n", my_progname);
|
||||
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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -34,6 +34,7 @@
|
|||
#include "sql_priv.h"
|
||||
#include "log_event.h"
|
||||
#include "sql_common.h"
|
||||
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||
|
||||
#define BIN_LOG_HEADER_SIZE 4
|
||||
#define PROBE_HEADER_LEN (EVENT_LEN_OFFSET+4)
|
||||
|
@ -1239,10 +1240,7 @@ static void print_version()
|
|||
static void usage()
|
||||
{
|
||||
print_version();
|
||||
puts("By Monty and Sasha, for your professional use\n\
|
||||
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");
|
||||
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2001, 2010"));
|
||||
printf("\
|
||||
Dumps a MySQL binary log in a format usable for viewing or for piping to\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
|
||||
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
|
||||
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"
|
||||
|
||||
#include "client_priv.h"
|
||||
|
@ -22,6 +20,7 @@
|
|||
#include <mysql_version.h>
|
||||
#include <mysqld_error.h>
|
||||
#include <sslopt-vars.h>
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
/* Exit codes */
|
||||
|
||||
|
@ -48,7 +47,7 @@ static char *shared_memory_base_name=0;
|
|||
#endif
|
||||
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[] =
|
||||
{
|
||||
|
@ -215,9 +214,7 @@ static void print_version(void)
|
|||
static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("By Jani Tolonen, 2001-04-20, MySQL Development Team.\n");
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n");
|
||||
puts("and you are welcome to modify and redistribute it under the GPL license.\n");
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||
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("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)),
|
||||
char *argument)
|
||||
{
|
||||
int orig_what_to_do= what_to_do;
|
||||
|
||||
switch(optid) {
|
||||
case 'a':
|
||||
what_to_do = DO_ANALYZE;
|
||||
|
@ -318,6 +317,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||
opt->name);
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -51,6 +51,8 @@
|
|||
#include "mysql_version.h"
|
||||
#include "mysqld_error.h"
|
||||
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
/* Exit codes */
|
||||
|
||||
#define EX_USAGE 1
|
||||
|
@ -584,8 +586,7 @@ static void short_usage_sub(void)
|
|||
static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("By Igor Romanenko, Monty, Jani & Sinisa.");
|
||||
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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||
puts("Dumping structure and contents of MySQL databases and tables.");
|
||||
short_usage_sub();
|
||||
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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -32,6 +32,8 @@
|
|||
#include <my_pthread.h>
|
||||
#endif
|
||||
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
|
||||
/* Global Thread counter */
|
||||
uint counter;
|
||||
|
@ -191,8 +193,7 @@ static void print_version(void)
|
|||
static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
|
||||
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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||
printf("\
|
||||
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\
|
||||
|
|
|
@ -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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -25,6 +25,7 @@
|
|||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#include <sslopt-vars.h>
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
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;
|
||||
|
@ -247,8 +248,7 @@ static void print_version(void)
|
|||
static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.");
|
||||
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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010)"));
|
||||
puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
|
||||
printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
|
||||
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
|
||||
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
|
||||
along with this program; if not, write to the Free Software
|
||||
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
|
||||
*/
|
||||
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
MySQL Slap
|
||||
|
@ -94,6 +89,7 @@ TODO:
|
|||
#include <sys/wait.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
|
||||
|
||||
#ifdef __WIN__
|
||||
#define srandom srand
|
||||
|
@ -686,8 +682,7 @@ static void print_version(void)
|
|||
static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("Copyright (C) 2005 MySQL AB");
|
||||
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(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005, 2010"));
|
||||
puts("Run a query multiple times against the server.\n");
|
||||
printf("Usage: %s [OPTIONS]\n",my_progname);
|
||||
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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -52,6 +52,8 @@
|
|||
#include <signal.h>
|
||||
#include <my_stacktrace.h>
|
||||
|
||||
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||
|
||||
#ifdef __WIN__
|
||||
#include <crtdbg.h>
|
||||
#define SIGNAL_FMT "exception 0x%x"
|
||||
|
@ -6260,8 +6262,7 @@ void print_version(void)
|
|||
void usage()
|
||||
{
|
||||
print_version();
|
||||
printf("MySQL AB, by Sasha, Matt, Monty & Jani\n");
|
||||
printf("This software comes with ABSOLUTELY NO WARRANTY\n\n");
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||
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);
|
||||
my_print_help(my_long_options);
|
||||
|
|
|
@ -131,16 +131,16 @@ IF(UNIX)
|
|||
|
||||
# Default GCC flags
|
||||
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_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
|
||||
ENDIF()
|
||||
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_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
|
||||
ENDIF()
|
||||
|
||||
|
||||
# HPUX flags
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES "HP")
|
||||
|
@ -156,7 +156,7 @@ IF(UNIX)
|
|||
ENDIF()
|
||||
SET(WITH_SSL no)
|
||||
ENDIF()
|
||||
|
||||
|
||||
# Linux flags
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
IF(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
|
@ -173,18 +173,18 @@ IF(UNIX)
|
|||
SET(WITH_SSL no)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
# OSX flags
|
||||
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?
|
||||
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_CXX_FLAGS_DEBUG "-O ${COMMON_CXX_FLAGS}")
|
||||
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-Os ${COMMON_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-Os ${COMMON_CXX_FLAGS}")
|
||||
ENDIF()
|
||||
|
||||
|
||||
# Solaris flags
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
||||
IF(CMAKE_SYSTEM_VERSION VERSION_GREATER "5.9")
|
||||
|
@ -219,7 +219,7 @@ IF(UNIX)
|
|||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
IF(CMAKE_C_FLAGS_DEBUG)
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}"
|
||||
CACHE STRING "Debug C compile flags")
|
||||
|
|
|
@ -59,13 +59,16 @@
|
|||
# - INSTALL_SUPPORTFILESDIR (various extra support files)
|
||||
#
|
||||
# - 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)
|
||||
SET(DEFAULT_INSTALL_LAYOUT "STANDALONE")
|
||||
ENDIF()
|
||||
|
||||
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(INSTALL_LAYOUT MATCHES "RPM")
|
||||
|
@ -83,6 +86,13 @@ IF(UNIX)
|
|||
SET(CMAKE_INSTALL_PREFIX ${default_prefix}
|
||||
CACHE PATH "install prefix" FORCE)
|
||||
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"
|
||||
CACHE PATH "config directory (for my.cnf)")
|
||||
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/plugins.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/misc.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.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.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.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
|
||||
|
@ -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_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_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.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.
|
||||
#
|
||||
########################################################################################
|
||||
|
||||
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 t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
|
||||
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));
|
||||
--enable_query_log
|
||||
|
||||
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;
|
||||
# Incident event
|
||||
--let $slave_sql_errno=1590
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
|
||||
--disable_query_log
|
||||
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);
|
||||
--enable_query_log
|
||||
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
|
||||
if (`SELECT @@binlog_format = 'STATEMENT' || @@binlog_format = 'MIXED'`)
|
||||
{
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
||||
}
|
||||
# Incident event
|
||||
--let $slave_skip_counter=1
|
||||
if (`SELECT @@binlog_format = 'ROW'`)
|
||||
{
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 2;
|
||||
--inc $slave_skip_counter
|
||||
}
|
||||
START SLAVE SQL_THREAD;
|
||||
--source include/wait_for_slave_sql_to_start.inc
|
||||
connection master;
|
||||
|
||||
let $diff_statement= SELECT * FROM t1;
|
||||
--source include/diff_master_slave.inc
|
||||
--let $slave_sql_errno=1590
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
--let $slave_skip_counter=
|
||||
|
||||
--echo ########################################################################################
|
||||
--echo # 2 - BEGIN - IMPLICIT COMMIT by DDL
|
||||
|
@ -178,17 +175,6 @@ BEGIN;
|
|||
CREATE TABLE t5 (a int);
|
||||
--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;
|
||||
--source include/diff_master_slave.inc
|
||||
|
||||
|
@ -373,6 +359,70 @@ COMMIT;
|
|||
let $diff_statement= SELECT * FROM t1;
|
||||
--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 # CLEAN
|
||||
--echo ########################################################################################
|
||||
|
@ -385,4 +435,4 @@ DROP TABLE IF EXISTS t4;
|
|||
DROP TABLE IF EXISTS t5;
|
||||
DROP TABLE IF EXISTS t6;
|
||||
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);
|
||||
SELECT GROUP_CONCAT(IFNULL(a,'')) FROM t1;
|
||||
SELECT GROUP_CONCAT(IF(a,a,'')) FROM t1;
|
||||
if (`SELECT @@character_set_connection != 'ucs2'`)
|
||||
{
|
||||
# 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;
|
||||
}
|
||||
SELECT GROUP_CONCAT(CASE WHEN a THEN a ELSE '' END) FROM t1;
|
||||
--enable_metadata
|
||||
SELECT COALESCE(a,'') FROM t1 GROUP BY 1;
|
||||
--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);
|
||||
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.
|
||||
#
|
||||
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;
|
||||
|
||||
our $opt_verbose= 0; # Verbose output, enable with --verbose
|
||||
|
|
|
@ -220,3 +220,14 @@ Variable_name Value
|
|||
Qcache_hits 1
|
||||
set GLOBAL query_cache_size=1048576;
|
||||
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;
|
||||
GROUP_CONCAT(IF(a,a,''))
|
||||
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;
|
||||
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
|
||||
|
|
|
@ -509,3 +509,18 @@ CREATE TABLE t3 LIKE t1;
|
|||
DELETE FROM t1.*, test.t2.*, a.* USING t1, t2, t3 AS a;
|
||||
DROP TABLE t1, t2, t3;
|
||||
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;
|
||||
-9223372036854775808 MOD -1
|
||||
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
|
||||
DROP TABLE t1;
|
||||
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
|
||||
39 39 39
|
||||
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 -------------------------------
|
||||
SET SESSION STORAGE_ENGINE = MyISAM;
|
||||
drop table if exists t1;
|
||||
|
|
|
@ -2632,7 +2632,8 @@ DROP TABLE IF EXISTS t1;
|
|||
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
# 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;
|
||||
# Connection: default
|
||||
SET debug_sync='now WAIT_FOR parked_truncate';
|
||||
|
@ -2647,10 +2648,11 @@ FLUSH TABLES t1;
|
|||
# Connection: default
|
||||
SET debug_sync='now WAIT_FOR parked_flush';
|
||||
SET debug_sync='now SIGNAL go_truncate';
|
||||
# Connection: con1
|
||||
# Reaping...
|
||||
# Connection: default
|
||||
# Ensure that truncate waits for a exclusive lock
|
||||
SET debug_sync= 'now SIGNAL go_show';
|
||||
# Connection: con1 (TRUNCATE)
|
||||
# Reaping...
|
||||
UNLOCK TABLES;
|
||||
# Connection: con2 (SHOW FIELDS FROM t1)
|
||||
# Reaping...
|
||||
Field Type Null Key Default Extra
|
||||
|
|
|
@ -3486,12 +3486,13 @@ ALTER TABLE m1 ADD INDEX (c1);
|
|||
UNLOCK TABLES;
|
||||
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 m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1);
|
||||
LOCK TABLE m1 WRITE;
|
||||
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;
|
||||
ALTER TABLE t1 ADD INDEX (c1);
|
||||
UNLOCK TABLES;
|
||||
|
@ -3661,4 +3662,16 @@ REPAIR TABLE t2 USE_FRM;
|
|||
Table Op Msg_type Msg_text
|
||||
test.t2 repair note The storage engine for the table doesn't support repair
|
||||
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
|
||||
|
|
|
@ -8,7 +8,7 @@ mysql.db OK
|
|||
mysql.event OK
|
||||
mysql.func OK
|
||||
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_keyword OK
|
||||
mysql.help_relation OK
|
||||
|
@ -21,7 +21,7 @@ mysql.procs_priv OK
|
|||
mysql.proxy_priv OK
|
||||
mysql.servers OK
|
||||
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.time_zone 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_type 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.db OK
|
||||
mysql.event OK
|
||||
|
@ -55,10 +57,64 @@ mysql.time_zone_name OK
|
|||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type 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 view v1 as select * from t1;
|
||||
test.t1 OK
|
||||
test.t1 Table is already up to date
|
||||
test.t1 OK
|
||||
test.t1 Table is already up to date
|
||||
drop view v1;
|
||||
drop table t1;
|
||||
create table `t``1`(a int);
|
||||
|
@ -127,6 +183,7 @@ Tables_in_test
|
|||
t1
|
||||
#mysql50#v-1
|
||||
v1
|
||||
test.t1 OK
|
||||
show tables;
|
||||
Tables_in_test
|
||||
t1
|
||||
|
@ -200,3 +257,6 @@ Tables_in_test (t1-1)
|
|||
t1-1
|
||||
drop table `t1-1`;
|
||||
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));
|
||||
insert into t1 values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
|
||||
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;;
|
||||
set debug_sync="now WAIT_FOR parked";
|
||||
On a second connection; clear the query cache.
|
||||
show status like 'Qcache_queries_in_cache';
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
set global query_cache_size= 0;
|
||||
Signal the debug hook to release the lock.
|
||||
select id from information_schema.processlist where state='wait_in_query_cache_insert' into @thread_id;
|
||||
kill query @thread_id;
|
||||
set debug_sync="now SIGNAL go";
|
||||
Show query cache status.
|
||||
show status like 'Qcache_queries_in_cache';
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
a
|
||||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||||
set debug_sync= 'RESET';
|
||||
set global query_cache_size= 0;
|
||||
use test;
|
||||
drop table t1;
|
||||
|
@ -32,11 +36,12 @@ SET GLOBAL concurrent_insert= 1;
|
|||
SET GLOBAL query_cache_size= 1024*512;
|
||||
SET GLOBAL query_cache_type= ON;
|
||||
# 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
|
||||
INSERT INTO t1 VALUES (4);
|
||||
# Switch to connection default
|
||||
# Wait for concurrent insert to reach the debug point
|
||||
SET DEBUG_SYNC = "now WAIT_FOR parked";
|
||||
# Switch to connection con2
|
||||
# Send SELECT that shouldn't be cached
|
||||
SELECT * FROM t1;
|
||||
|
@ -46,9 +51,7 @@ a
|
|||
3
|
||||
# Switch to connection default
|
||||
# Notify the concurrent insert to proceed
|
||||
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
|
||||
WHERE STATE = 'wait_after_query_cache_invalidate' INTO @thread_id;
|
||||
KILL QUERY @thread_id;
|
||||
SET DEBUG_SYNC = "now SIGNAL go";
|
||||
# Switch to connection con1
|
||||
# Gather insert result
|
||||
SHOW STATUS LIKE "Qcache_queries_in_cache";
|
||||
|
@ -66,6 +69,7 @@ Variable_name Value
|
|||
Qcache_queries_in_cache 1
|
||||
# Disconnect
|
||||
# Restore defaults
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
RESET QUERY CACHE;
|
||||
DROP TABLE t1,t2;
|
||||
SET GLOBAL concurrent_insert= DEFAULT;
|
||||
|
@ -108,43 +112,48 @@ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|||
** before the mutex lock in invalidate_table_internal.
|
||||
** This will allow new result sets to be written into the QC.
|
||||
**
|
||||
SET SESSION debug='+d,wait_in_query_cache_invalidate1';
|
||||
SET SESSION debug='+d,wait_in_query_cache_invalidate2';
|
||||
SET DEBUG_SYNC="wait_in_query_cache_invalidate1 SIGNAL parked1_1 WAIT_FOR go1_1";
|
||||
SET DEBUG_SYNC="wait_in_query_cache_invalidate2 SIGNAL parked1_2 WAIT_FOR go1_2";
|
||||
DELETE FROM t1 WHERE a like '%a%';;
|
||||
=================================== Connection default
|
||||
** Assert that the expect process status is obtained.
|
||||
SET DEBUG_SYNC="now WAIT_FOR parked1_1";
|
||||
**
|
||||
=================================== Connection thd2
|
||||
** 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
|
||||
** 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;
|
||||
=================================== Connection default
|
||||
** Assert that the SELECT-stmt thread reaches the sync point.
|
||||
SET DEBUG_SYNC="now WAIT_FOR parked2";
|
||||
**
|
||||
**
|
||||
=================================== Connection thd3
|
||||
** On THD3: Insert another result into the cache and block on the same
|
||||
** debug hook.
|
||||
SET SESSION debug='+d,wait_in_query_cache_insert';
|
||||
SELECT SQL_CACHE * FROM t4 UNION SELECT * FROM t5;;
|
||||
SET DEBUG_SYNC="wait_in_query_cache_insert SIGNAL parked3 WAIT_FOR go3 EXECUTE 1";
|
||||
SELECT SQL_CACHE * FROM t4 UNION SELECT * FROM t5;
|
||||
=================================== 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
|
||||
** lock and set query cache status to TABLE_FLUSH_IN_PROGRESS and then
|
||||
** 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;
|
||||
KILL QUERY @flush_thread_id;
|
||||
SET DEBUG_SYNC="now SIGNAL go1_1";
|
||||
** 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.
|
||||
** The threads will grab the guard mutex enter the wait condition and
|
||||
** and finally release the mutex. The threads will continue to wait
|
||||
** until a broadcast signal reaches them causing both threads to
|
||||
** 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;
|
||||
KILL QUERY @thread_id;
|
||||
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;
|
||||
SET DEBUG_SYNC="now SIGNAL go2";
|
||||
SET DEBUG_SYNC="now SIGNAL go3";
|
||||
**
|
||||
** Finally signal the DELETE statement on THD1 one last time.
|
||||
** 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
|
||||
** invalidations and a broadcast signal will be sent to the thread
|
||||
** 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;
|
||||
KILL QUERY @flush_thread_id;
|
||||
SET DEBUG_SYNC="now SIGNAL go1_2";
|
||||
**
|
||||
*************************************************************************
|
||||
** No tables should be locked
|
||||
|
@ -172,6 +180,7 @@ DELETE FROM t4;
|
|||
DELETE FROM t5;
|
||||
=================================== Connection thd1
|
||||
** Done.
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
SET GLOBAL query_cache_size= 0;
|
||||
# Restore defaults
|
||||
RESET QUERY CACHE;
|
||||
|
@ -179,3 +188,35 @@ FLUSH STATUS;
|
|||
DROP TABLE t1,t2,t3,t4,t5;
|
||||
SET GLOBAL query_cache_size= 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
|
||||
DROP TABLE t1_aux, t1_not_null|
|
||||
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 @b = 0;
|
||||
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;
|
||||
@a @b
|
||||
0 0
|
||||
DELETE FROM t1;
|
||||
SELECT @a, @b;
|
||||
@a @b
|
||||
1 1
|
||||
INSERT INTO t1 VALUES (1);
|
||||
DELETE FROM t1;
|
||||
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
|
||||
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
|
||||
#
|
||||
|
|
|
@ -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_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 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_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
|
||||
|
@ -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)
|
||||
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 LOAD_OPTION varchar 64 192 utf8 utf8_general_ci varchar(64)
|
||||
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 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;
|
||||
create index t1u on t1 (u(1));
|
||||
drop table t1;
|
||||
set global innodb_file_per_table=1;
|
||||
set global innodb_file_format=Barracuda;
|
||||
set global innodb_file_format_max=Barracuda;
|
||||
set global innodb_file_per_table=0;
|
||||
set global innodb_file_format=Antelope;
|
||||
set global innodb_file_format_max=Antelope;
|
||||
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
|
||||
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
|
||||
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 t9 Redundant
|
||||
drop table t8, t9;
|
||||
set global innodb_file_per_table=1;
|
||||
set global innodb_file_format=Barracuda;
|
||||
set global innodb_file_per_table=0;
|
||||
set global innodb_file_format=Antelope;
|
||||
set global innodb_file_per_table=on;
|
||||
set global innodb_file_format=`Barracuda`;
|
||||
set global innodb_file_format_max=`Antelope`;
|
||||
|
|
|
@ -2424,10 +2424,6 @@ drop table t1,t2;
|
|||
CREATE TABLE t1 (
|
||||
id INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY (id)
|
||||
) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (
|
||||
id INTEGER NOT NULL,
|
||||
FOREIGN KEY (id) REFERENCES t1 (id)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO t1 (id) VALUES (NULL);
|
||||
SELECT * FROM t1;
|
||||
id
|
||||
|
@ -2443,7 +2439,7 @@ INSERT INTO t1 (id) VALUES (NULL);
|
|||
SELECT * FROM t1;
|
||||
id
|
||||
1
|
||||
DROP TABLE t2, t1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1
|
||||
(
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
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 t4;
|
||||
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;
|
||||
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;
|
||||
create table t1 (a 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 1264 Out of range value for column 'col84' at row 1
|
||||
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_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 1030 Got error 139 from storage engine
|
||||
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_per_table=1;
|
||||
SET GLOBAL innodb_file_per_table=0;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Barracuda
|
||||
Antelope
|
||||
select @@innodb_file_format_check;
|
||||
@@innodb_file_format_check
|
||||
1
|
||||
|
@ -17,14 +17,14 @@ Barracuda
|
|||
set global innodb_file_format=default;
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Barracuda
|
||||
Antelope
|
||||
set global innodb_file_format=on;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'ON'
|
||||
set global innodb_file_format=off;
|
||||
ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'off'
|
||||
select @@innodb_file_format;
|
||||
@@innodb_file_format
|
||||
Barracuda
|
||||
Antelope
|
||||
set global innodb_file_format_max=antelope;
|
||||
set global innodb_file_format_max=barracuda;
|
||||
set global innodb_file_format_max=cheetah;
|
||||
|
@ -46,5 +46,5 @@ Antelope
|
|||
set global innodb_file_format_max=antelope;
|
||||
set global innodb_file_format_check=off;
|
||||
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;
|
||||
|
|
|
@ -1941,7 +1941,7 @@ INSERT INTO t2 VALUES (3,2);
|
|||
SET AUTOCOMMIT = 0;
|
||||
START TRANSACTION;
|
||||
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;
|
||||
id
|
||||
1
|
||||
|
@ -1953,7 +1953,7 @@ id
|
|||
2
|
||||
START TRANSACTION;
|
||||
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;
|
||||
id
|
||||
1
|
||||
|
@ -1971,7 +1971,7 @@ id
|
|||
2
|
||||
COMMIT;
|
||||
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;
|
||||
id
|
||||
1
|
||||
|
@ -1983,9 +1983,12 @@ id
|
|||
1
|
||||
2
|
||||
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;
|
||||
SELECT * FROM t1;
|
||||
id
|
||||
1
|
||||
2
|
||||
TRUNCATE TABLE t2;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
||||
|
@ -2077,9 +2080,9 @@ i i
|
|||
** error handling inside a row iteration.
|
||||
**
|
||||
DROP TRIGGER trg;
|
||||
TRUNCATE TABLE t1;
|
||||
TRUNCATE TABLE t2;
|
||||
TRUNCATE TABLE t3;
|
||||
DELETE FROM t1;
|
||||
DELETE FROM t2;
|
||||
DELETE FROM t3;
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
||||
INSERT INTO t4 VALUES (3,3),(4,4);
|
||||
|
@ -2105,9 +2108,9 @@ DROP TRIGGER trg;
|
|||
**
|
||||
** Induce an error midway through an AFTER-trigger
|
||||
**
|
||||
TRUNCATE TABLE t4;
|
||||
TRUNCATE TABLE t1;
|
||||
TRUNCATE TABLE t3;
|
||||
DELETE FROM t4;
|
||||
DELETE FROM t1;
|
||||
DELETE FROM t3;
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
||||
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)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE t2 (
|
||||
id INTEGER NOT NULL,
|
||||
FOREIGN KEY (id) REFERENCES t1 (id)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
INSERT INTO t1 (id) VALUES (NULL);
|
||||
SELECT * FROM t1;
|
||||
TRUNCATE t1;
|
||||
|
@ -1488,7 +1483,7 @@ DELETE FROM t1;
|
|||
TRUNCATE t1;
|
||||
INSERT INTO t1 (id) VALUES (NULL);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t2, t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Test that foreign keys in temporary tables are not accepted (bug #12084)
|
||||
CREATE TABLE t1
|
||||
|
@ -1723,13 +1718,15 @@ update t2 set a=2;
|
|||
update t3 set a=2;
|
||||
-- error 1452
|
||||
update t4 set a=2;
|
||||
-- error 1451
|
||||
-- error ER_TRUNCATE_ILLEGAL_FK
|
||||
truncate t1;
|
||||
-- error 1451
|
||||
-- error ER_TRUNCATE_ILLEGAL_FK
|
||||
truncate t3;
|
||||
truncate t2;
|
||||
truncate t4;
|
||||
-- error ER_TRUNCATE_ILLEGAL_FK
|
||||
truncate t1;
|
||||
-- error ER_TRUNCATE_ILLEGAL_FK
|
||||
truncate t3;
|
||||
|
||||
drop table t4,t3,t2,t1;
|
||||
|
|
|
@ -151,14 +151,14 @@ INSERT INTO t2 VALUES (3,2);
|
|||
SET AUTOCOMMIT = 0;
|
||||
|
||||
START TRANSACTION;
|
||||
--error ER_ROW_IS_REFERENCED_2
|
||||
--error ER_TRUNCATE_ILLEGAL_FK
|
||||
TRUNCATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
COMMIT;
|
||||
SELECT * FROM t1;
|
||||
|
||||
START TRANSACTION;
|
||||
--error ER_ROW_IS_REFERENCED_2
|
||||
--error ER_TRUNCATE_ILLEGAL_FK
|
||||
TRUNCATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
ROLLBACK;
|
||||
|
@ -170,13 +170,14 @@ START TRANSACTION;
|
|||
SELECT * FROM t1;
|
||||
COMMIT;
|
||||
|
||||
--error ER_ROW_IS_REFERENCED_2
|
||||
--error ER_TRUNCATE_ILLEGAL_FK
|
||||
TRUNCATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
DELETE FROM t2 WHERE id = 3;
|
||||
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1;
|
||||
--error ER_TRUNCATE_ILLEGAL_FK
|
||||
TRUNCATE TABLE t1;
|
||||
ROLLBACK;
|
||||
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 **
|
||||
DROP TRIGGER trg;
|
||||
TRUNCATE TABLE t1;
|
||||
TRUNCATE TABLE t2;
|
||||
TRUNCATE TABLE t3;
|
||||
DELETE FROM t1;
|
||||
DELETE FROM t2;
|
||||
DELETE FROM t3;
|
||||
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
||||
|
@ -304,9 +305,9 @@ DROP TRIGGER trg;
|
|||
--echo **
|
||||
--echo ** Induce an error midway through an AFTER-trigger
|
||||
--echo **
|
||||
TRUNCATE TABLE t4;
|
||||
TRUNCATE TABLE t1;
|
||||
TRUNCATE TABLE t3;
|
||||
DELETE FROM t4;
|
||||
DELETE FROM t1;
|
||||
DELETE FROM t3;
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4);
|
||||
INSERT INTO t3 VALUES (1),(2),(3),(4);
|
||||
delimiter ||;
|
||||
|
|
|
@ -177,7 +177,7 @@ let $any_unique= `SELECT @my_errno IN ($ER_DUP_KEY,$ER_DUP_ENTRY)`;
|
|||
# @my_errno AS sql_errno;
|
||||
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
|
||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||
--echo # Sorry, have to abort.
|
||||
|
@ -219,7 +219,7 @@ if ($any_unique)
|
|||
# @my_errno AS sql_errno;
|
||||
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
|
||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||
--echo # Sorry, have to abort.
|
||||
|
@ -255,7 +255,7 @@ if ($any_unique)
|
|||
# @my_errno AS sql_errno;
|
||||
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
|
||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||
--echo # Sorry, have to abort.
|
||||
|
@ -503,7 +503,7 @@ if ($no_debug)
|
|||
eval SET @my_errno = $mysql_errno;
|
||||
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
|
||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||
--echo # Sorry, have to abort.
|
||||
|
@ -566,7 +566,7 @@ eval SET @my_errno = $mysql_errno;
|
|||
let $run= `SELECT @my_errno = 0`;
|
||||
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
|
||||
SELECT '# SQL code we got was: ' AS "", @my_errno AS "";
|
||||
--echo # Sorry, have to abort.
|
||||
|
|
|
@ -57,7 +57,6 @@ t1 CREATE TABLE `t1` (
|
|||
`f_varchar` varchar(30) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
t1.frm
|
||||
t1.ibd
|
||||
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
|
||||
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
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (YEAR(f_date)) */
|
||||
t1#P#p0.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
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
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (DAYOFYEAR(f_date)) */
|
||||
t1#P#p0.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
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
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY HASH (YEAR(f_date)) */
|
||||
t1#P#p0.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
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 part1 ENGINE = InnoDB,
|
||||
PARTITION part7 ENGINE = InnoDB) */
|
||||
t1#P#p0.ibd
|
||||
t1#P#part1.ibd
|
||||
t1#P#part7.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
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 part7 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.par
|
||||
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 p6 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.par
|
||||
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 p5 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.par
|
||||
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 p4 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.par
|
||||
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 part2 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.par
|
||||
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 part7 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.par
|
||||
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 part1 ENGINE = InnoDB,
|
||||
PARTITION part7 ENGINE = InnoDB) */
|
||||
t1#P#p0.ibd
|
||||
t1#P#part1.ibd
|
||||
t1#P#part7.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
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))
|
||||
(PARTITION p0 ENGINE = InnoDB,
|
||||
PARTITION part1 ENGINE = InnoDB) */
|
||||
t1#P#p0.ibd
|
||||
t1#P#part1.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
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
|
||||
/*!50100 PARTITION BY HASH (YEAR(f_date))
|
||||
(PARTITION p0 ENGINE = InnoDB) */
|
||||
t1#P#p0.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
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
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
t1.frm
|
||||
t1.ibd
|
||||
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
|
||||
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
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
t1.frm
|
||||
t1.ibd
|
||||
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
|
||||
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
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (f_int1) */
|
||||
t1#P#p0.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
|
@ -498,9 +448,6 @@ t1 CREATE TABLE `t1` (
|
|||
(PARTITION p0 ENGINE = InnoDB,
|
||||
PARTITION part1 ENGINE = InnoDB,
|
||||
PARTITION part7 ENGINE = InnoDB) */
|
||||
t1#P#p0.ibd
|
||||
t1#P#part1.ibd
|
||||
t1#P#part7.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
|
@ -525,10 +472,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION part1 ENGINE = InnoDB,
|
||||
PARTITION part7 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.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
|
@ -557,14 +500,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION p5 ENGINE = InnoDB,
|
||||
PARTITION p6 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.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
|
@ -599,13 +534,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION p4 ENGINE = InnoDB,
|
||||
PARTITION p5 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.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
|
@ -631,12 +559,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION part2 ENGINE = InnoDB,
|
||||
PARTITION p4 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.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
|
@ -661,11 +583,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION part7 ENGINE = InnoDB,
|
||||
PARTITION part2 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.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
|
@ -689,10 +606,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION part1 ENGINE = InnoDB,
|
||||
PARTITION part7 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.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
|
@ -715,9 +628,6 @@ t1 CREATE TABLE `t1` (
|
|||
(PARTITION p0 ENGINE = InnoDB,
|
||||
PARTITION part1 ENGINE = InnoDB,
|
||||
PARTITION part7 ENGINE = InnoDB) */
|
||||
t1#P#p0.ibd
|
||||
t1#P#part1.ibd
|
||||
t1#P#part7.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
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)
|
||||
(PARTITION p0 ENGINE = InnoDB,
|
||||
PARTITION part1 ENGINE = InnoDB) */
|
||||
t1#P#p0.ibd
|
||||
t1#P#part1.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
|
||||
|
@ -761,7 +669,6 @@ t1 CREATE TABLE `t1` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY KEY (f_int1)
|
||||
(PARTITION p0 ENGINE = InnoDB) */
|
||||
t1#P#p0.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
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
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
t1.frm
|
||||
t1.ibd
|
||||
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
|
||||
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
|
||||
|
|
|
@ -77,8 +77,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 2 */
|
||||
|
||||
unified filelist
|
||||
t1#P#p0.ibd
|
||||
t1#P#p1.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
|
||||
|
@ -534,11 +532,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 5 */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -1009,14 +1002,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -1483,12 +1468,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -1951,14 +1930,6 @@ SUBPARTITIONS 2
|
|||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -2434,14 +2405,6 @@ SUBPARTITION BY KEY (f_int1)
|
|||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -2919,14 +2882,6 @@ SUBPARTITION BY HASH (f_int1 + 1)
|
|||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -3390,15 +3345,6 @@ SUBPARTITIONS 3
|
|||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -3856,8 +3802,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 2 */
|
||||
|
||||
unified filelist
|
||||
t1#P#p0.ibd
|
||||
t1#P#p1.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
|
||||
|
@ -4313,11 +4257,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 5 */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -4788,14 +4727,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -5262,12 +5193,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -5730,14 +5655,6 @@ SUBPARTITIONS 2
|
|||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -6211,14 +6128,6 @@ SUBPARTITION BY KEY (f_int2)
|
|||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -6692,14 +6601,6 @@ SUBPARTITION BY HASH (f_int2 + 1)
|
|||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -7163,15 +7064,6 @@ SUBPARTITIONS 3
|
|||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -7635,8 +7527,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 2 */
|
||||
|
||||
unified filelist
|
||||
t1#P#p0.ibd
|
||||
t1#P#p1.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
|
||||
|
@ -8129,11 +8019,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 5 */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -8641,14 +8526,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -9152,12 +9029,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -9657,14 +9528,6 @@ SUBPARTITIONS 2
|
|||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -10177,14 +10040,6 @@ SUBPARTITION BY KEY (f_int1)
|
|||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -10699,14 +10554,6 @@ SUBPARTITION BY HASH (f_int1 + 1)
|
|||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -11207,15 +11054,6 @@ SUBPARTITIONS 3
|
|||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -11709,8 +11547,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 2 */
|
||||
|
||||
unified filelist
|
||||
t1#P#p0.ibd
|
||||
t1#P#p1.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
|
||||
|
@ -12203,11 +12039,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 5 */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -12715,14 +12546,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -13226,12 +13049,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -13731,14 +13548,6 @@ SUBPARTITIONS 2
|
|||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -14251,14 +14060,6 @@ SUBPARTITION BY KEY (f_int1)
|
|||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -14773,14 +14574,6 @@ SUBPARTITION BY HASH (f_int1 + 1)
|
|||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -15281,15 +15074,6 @@ SUBPARTITIONS 3
|
|||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -15783,8 +15567,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 2 */
|
||||
|
||||
unified filelist
|
||||
t1#P#p0.ibd
|
||||
t1#P#p1.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
|
||||
|
@ -16293,11 +16075,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 5 */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -16821,14 +16598,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -17348,12 +17117,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -17869,14 +17632,6 @@ SUBPARTITIONS 2
|
|||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -18405,14 +18160,6 @@ SUBPARTITION BY KEY (f_int1)
|
|||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -18943,14 +18690,6 @@ SUBPARTITION BY HASH (f_int1 + 1)
|
|||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -19467,15 +19206,6 @@ SUBPARTITIONS 3
|
|||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -19990,8 +19720,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 2 */
|
||||
|
||||
unified filelist
|
||||
t1#P#p0.ibd
|
||||
t1#P#p1.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
|
||||
|
@ -20484,11 +20212,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 5 */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -20996,14 +20719,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -21507,12 +21222,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -22012,14 +21721,6 @@ SUBPARTITIONS 2
|
|||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -22530,14 +22231,6 @@ SUBPARTITION BY KEY (f_int2)
|
|||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -23048,14 +22741,6 @@ SUBPARTITION BY HASH (f_int2 + 1)
|
|||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -23556,15 +23241,6 @@ SUBPARTITIONS 3
|
|||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -24058,8 +23734,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 2 */
|
||||
|
||||
unified filelist
|
||||
t1#P#p0.ibd
|
||||
t1#P#p1.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
|
||||
|
@ -24552,11 +24226,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 5 */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -25064,14 +24733,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -25575,12 +25236,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -26080,14 +25735,6 @@ SUBPARTITIONS 2
|
|||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -26598,14 +26245,6 @@ SUBPARTITION BY KEY (f_int2)
|
|||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -27116,14 +26755,6 @@ SUBPARTITION BY HASH (f_int2 + 1)
|
|||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -27624,15 +27255,6 @@ SUBPARTITIONS 3
|
|||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -28126,8 +27748,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 2 */
|
||||
|
||||
unified filelist
|
||||
t1#P#p0.ibd
|
||||
t1#P#p1.ibd
|
||||
t1.frm
|
||||
t1.par
|
||||
|
||||
|
@ -28636,11 +28256,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITIONS 5 */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -29164,14 +28779,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -29691,12 +29298,6 @@ t1 CREATE TABLE `t1` (
|
|||
PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -30212,14 +29813,6 @@ SUBPARTITIONS 2
|
|||
PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -30746,14 +30339,6 @@ SUBPARTITION BY KEY (f_int2)
|
|||
SUBPARTITION subpart42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -31280,14 +30865,6 @@ SUBPARTITION BY HASH (f_int2 + 1)
|
|||
SUBPARTITION sp42 ENGINE = InnoDB)) */
|
||||
|
||||
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.par
|
||||
|
||||
|
@ -31804,15 +31381,6 @@ SUBPARTITIONS 3
|
|||
PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */
|
||||
|
||||
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.par
|
||||
|
||||
|
|
|
@ -6,19 +6,19 @@ show status like 'Slave_heartbeat_period';;
|
|||
Variable_name Slave_heartbeat_period
|
||||
Value 5.000
|
||||
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';;
|
||||
Variable_name Slave_heartbeat_period
|
||||
Value 5.000
|
||||
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 0.0009999;
|
||||
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';;
|
||||
Variable_name Slave_heartbeat_period
|
||||
Value 0.000
|
||||
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root', master_heartbeat_period= 4294967;
|
||||
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';;
|
||||
Variable_name Slave_heartbeat_period
|
||||
Value 4294967.000
|
||||
|
@ -30,7 +30,7 @@ reset slave;
|
|||
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;
|
||||
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';;
|
||||
Variable_name Slave_heartbeat_period
|
||||
Value 5.001
|
||||
|
@ -42,7 +42,7 @@ Variable_name Slave_heartbeat_period
|
|||
Value 4.000
|
||||
set @@global.slave_net_timeout= 3 /* must be a warning */;
|
||||
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;
|
||||
drop table if exists t1;
|
||||
set @@global.slave_net_timeout= 10;
|
||||
|
|
|
@ -38,14 +38,14 @@ RESET SLAVE;
|
|||
*** Warning if updated slave_net_timeout < slave_heartbeat_timeout ***
|
||||
SET @@global.slave_net_timeout=FLOOR(SLAVE_HEARTBEAT_TIMEOUT)-1;
|
||||
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;
|
||||
RESET SLAVE;
|
||||
|
||||
*** 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;
|
||||
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;
|
||||
|
||||
*** CHANGE MASTER statement only updates slave_heartbeat_period ***
|
||||
|
@ -140,7 +140,7 @@ Slave_heartbeat_period 0.001
|
|||
RESET SLAVE;
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=0.0009;
|
||||
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';
|
||||
Variable_name Value
|
||||
Slave_heartbeat_period 0.000
|
||||
|
@ -149,19 +149,19 @@ RESET SLAVE;
|
|||
*** Max slave_heartbeat_timeout ***
|
||||
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_PORT, MASTER_USER='root', MASTER_HEARTBEAT_PERIOD=4294967;
|
||||
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';
|
||||
Variable_name Value
|
||||
Slave_heartbeat_period 4294967.000
|
||||
RESET SLAVE;
|
||||
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;
|
||||
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;
|
||||
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;
|
||||
|
||||
*** Misc incorrect values ***
|
||||
|
|
|
@ -5,6 +5,8 @@ reset slave;
|
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
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 t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
|
||||
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
|
||||
*** Single statement on non-transactional table ***
|
||||
Got one of the listed errors
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
||||
START SLAVE SQL_THREAD;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
*** Single statement on both transactional and non-transactional tables. ***
|
||||
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/wait_for_slave_sql_error_and_skip.inc
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1;
|
||||
include/start_slave.inc
|
||||
########################################################################################
|
||||
# 2 - BEGIN - IMPLICIT COMMIT by DDL
|
||||
########################################################################################
|
||||
|
@ -119,6 +122,35 @@ BEGIN;
|
|||
Got one of the listed errors
|
||||
COMMIT;
|
||||
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
|
||||
########################################################################################
|
||||
|
|
|
@ -5,6 +5,8 @@ reset slave;
|
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
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 t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
|
||||
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
|
||||
*** Single statement on non-transactional table ***
|
||||
Got one of the listed errors
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
||||
START SLAVE SQL_THREAD;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
*** Single statement on both transactional and non-transactional tables. ***
|
||||
Got one of the listed errors
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 2;
|
||||
START SLAVE SQL_THREAD;
|
||||
source include/diff_master_slave.inc;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
|
||||
include/start_slave.inc
|
||||
########################################################################################
|
||||
# 2 - BEGIN - IMPLICIT COMMIT by DDL
|
||||
########################################################################################
|
||||
|
@ -39,8 +42,6 @@ Got one of the listed errors
|
|||
BEGIN;
|
||||
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;
|
||||
########################################################################################
|
||||
# 3 - BEGIN - COMMIT
|
||||
|
@ -122,6 +123,35 @@ BEGIN;
|
|||
Got one of the listed errors
|
||||
COMMIT;
|
||||
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
|
||||
########################################################################################
|
||||
|
|
|
@ -5,6 +5,8 @@ reset slave;
|
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
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 t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
|
||||
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
|
||||
*** Single statement on non-transactional table ***
|
||||
Got one of the listed errors
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
|
||||
START SLAVE SQL_THREAD;
|
||||
--source include/wait_for_slave_sql_error_and_skip.inc
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
|
||||
include/start_slave.inc
|
||||
*** Single statement on both transactional and non-transactional tables. ***
|
||||
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/wait_for_slave_sql_error_and_skip.inc
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 1;
|
||||
include/start_slave.inc
|
||||
########################################################################################
|
||||
# 2 - BEGIN - IMPLICIT COMMIT by DDL
|
||||
########################################################################################
|
||||
|
@ -119,6 +122,35 @@ BEGIN;
|
|||
Got one of the listed errors
|
||||
COMMIT;
|
||||
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
|
||||
########################################################################################
|
||||
|
|
|
@ -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`))
|
||||
'---Check when foreign_key_checks is disabled---'
|
||||
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;
|
||||
TRUNCATE t1;
|
||||
TRUNCATE t2;
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
SET @start_global_value = @@global.innodb_file_format;
|
||||
SELECT @start_global_value;
|
||||
@start_global_value
|
||||
Barracuda
|
||||
Antelope
|
||||
Valid values are 'Antelope' and 'Barracuda'
|
||||
select @@global.innodb_file_format in ('Antelope', 'Barracuda');
|
||||
@@global.innodb_file_format in ('Antelope', 'Barracuda')
|
||||
1
|
||||
select @@global.innodb_file_format;
|
||||
@@global.innodb_file_format
|
||||
Barracuda
|
||||
Antelope
|
||||
select @@session.innodb_file_format;
|
||||
ERROR HY000: Variable 'innodb_file_format' is a GLOBAL variable
|
||||
show global variables like 'innodb_file_format';
|
||||
Variable_name Value
|
||||
innodb_file_format Barracuda
|
||||
innodb_file_format Antelope
|
||||
show session variables like 'innodb_file_format';
|
||||
Variable_name Value
|
||||
innodb_file_format Barracuda
|
||||
innodb_file_format Antelope
|
||||
select * from information_schema.global_variables where variable_name='innodb_file_format';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT Barracuda
|
||||
INNODB_FILE_FORMAT Antelope
|
||||
select * from information_schema.session_variables where variable_name='innodb_file_format';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_FILE_FORMAT Barracuda
|
||||
INNODB_FILE_FORMAT Antelope
|
||||
set global innodb_file_format='Antelope';
|
||||
select @@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;
|
||||
SELECT @@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---'
|
||||
#===========================================================
|
||||
|
||||
--Error ER_ROW_IS_REFERENCED_2
|
||||
--Error ER_TRUNCATE_ILLEGAL_FK
|
||||
TRUNCATE t1;
|
||||
|
||||
SET @@session.foreign_key_checks = 0;
|
||||
|
|
|
@ -14,3 +14,18 @@ let $engine_type= InnoDB;
|
|||
let $test_foreign_keys= 1;
|
||||
|
||||
--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;
|
||||
|
||||
--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
|
||||
mysqlhotcopy_myisam : 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
|
||||
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
|
||||
|
|
|
@ -458,3 +458,9 @@ SELECT 2 DIV -2;
|
|||
SELECT -(1 DIV 0);
|
||||
# Crashed the server with SIGFPE before the bugfix
|
||||
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;
|
||||
|
||||
--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
|
||||
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;
|
||||
|
||||
connection default;
|
||||
|
@ -3994,15 +3995,17 @@ connection default;
|
|||
--echo # Connection: default
|
||||
SET debug_sync='now WAIT_FOR parked_flush';
|
||||
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;
|
||||
--echo # Connection: con1
|
||||
--echo # Connection: con1 (TRUNCATE)
|
||||
--echo # Reaping...
|
||||
reap;
|
||||
|
||||
connection default;
|
||||
--echo # Connection: default
|
||||
SET debug_sync= 'now SIGNAL go_show';
|
||||
UNLOCK TABLES;
|
||||
|
||||
connection con2;
|
||||
--echo # Connection: con2 (SHOW FIELDS FROM t1)
|
||||
|
|
|
@ -2600,11 +2600,12 @@ UNLOCK TABLES;
|
|||
DROP TABLE m1, t1;
|
||||
|
||||
--echo #
|
||||
--echo # Locking the merge table will implicitly lock children.
|
||||
--echo # Locking the merge table won't implicitly lock children.
|
||||
--echo #
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1);
|
||||
LOCK TABLE m1 WRITE;
|
||||
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
||||
ALTER TABLE t1 ADD INDEX (c1);
|
||||
LOCK TABLE m1 WRITE, t1 WRITE;
|
||||
ALTER TABLE t1 ADD INDEX (c1);
|
||||
|
@ -2776,6 +2777,27 @@ REPAIR TABLE t2 USE_FRM;
|
|||
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
|
||||
|
||||
--disable_result_log
|
||||
|
|
|
@ -23,10 +23,13 @@ drop database if exists client_test_db;
|
|||
# Bug #13783 mysqlcheck tries to optimize and analyze information_schema
|
||||
#
|
||||
--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
|
||||
--exec $MYSQL_CHECK --analyze --optimize --databases test information_schema mysql
|
||||
--exec $MYSQL_CHECK --analyze --optimize information_schema schemata
|
||||
--exec $MYSQL_CHECK --analyze --databases test information_schema mysql
|
||||
--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
|
||||
|
@ -34,9 +37,11 @@ drop database if exists client_test_db;
|
|||
create table t1 (a int);
|
||||
create view v1 as select * from t1;
|
||||
--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
|
||||
--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 table t1;
|
||||
|
||||
|
@ -113,7 +118,8 @@ show tables;
|
|||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--copy_file $MYSQLD_DATADIR/test/v1.frm $MYSQLD_DATADIR/test/v-1.frm
|
||||
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;
|
||||
drop view v1, `v-1`;
|
||||
drop table t1;
|
||||
|
@ -212,3 +218,14 @@ show tables like 't1-1';
|
|||
drop table `t1-1`;
|
||||
|
||||
--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/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
|
||||
|
@ -18,12 +18,11 @@ connect (bug30887con2, localhost, root, ,test);
|
|||
|
||||
connection bug30887con1;
|
||||
--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;
|
||||
|
||||
connection default;
|
||||
let $wait_condition= select count(*)= 1 from information_schema.processlist where state= 'wait_in_query_cache_insert';
|
||||
--source include/wait_condition.inc
|
||||
set debug_sync="now WAIT_FOR parked";
|
||||
|
||||
connection bug30887con2;
|
||||
--echo On a second connection; clear the query cache.
|
||||
|
@ -32,14 +31,18 @@ set global query_cache_size= 0;
|
|||
|
||||
connection default;
|
||||
--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;
|
||||
kill query @thread_id;
|
||||
set debug_sync="now SIGNAL go";
|
||||
|
||||
--echo Show query cache status.
|
||||
show status like 'Qcache_queries_in_cache';
|
||||
|
||||
connection bug30887con1;
|
||||
--reap
|
||||
|
||||
disconnect bug30887con1;
|
||||
disconnect bug30887con2;
|
||||
connection default;
|
||||
set debug_sync= 'RESET';
|
||||
set global query_cache_size= 0;
|
||||
use test;
|
||||
drop table t1;
|
||||
|
@ -67,18 +70,14 @@ connect(con2,localhost,root,,test,,);
|
|||
|
||||
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
|
||||
--send INSERT INTO t1 VALUES (4)
|
||||
|
||||
connection default;
|
||||
--echo # Switch to connection default
|
||||
--echo # Wait for concurrent insert to reach the debug point
|
||||
let $wait_condition=
|
||||
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
|
||||
SET DEBUG_SYNC = "now WAIT_FOR parked";
|
||||
|
||||
connection con2;
|
||||
--echo # Switch to connection con2
|
||||
|
@ -88,9 +87,7 @@ SELECT * FROM t1;
|
|||
connection default;
|
||||
--echo # Switch to connection default
|
||||
--echo # Notify the concurrent insert to proceed
|
||||
SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST
|
||||
WHERE STATE = 'wait_after_query_cache_invalidate' INTO @thread_id;
|
||||
KILL QUERY @thread_id;
|
||||
SET DEBUG_SYNC = "now SIGNAL go";
|
||||
|
||||
connection con1;
|
||||
--echo # Switch to connection con1
|
||||
|
@ -107,6 +104,7 @@ disconnect con2;
|
|||
|
||||
connection default;
|
||||
--echo # Restore defaults
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
RESET QUERY CACHE;
|
||||
DROP TABLE t1,t2;
|
||||
SET GLOBAL concurrent_insert= DEFAULT;
|
||||
|
@ -157,15 +155,14 @@ SELECT SQL_CACHE * FROM t1;
|
|||
--echo ** before the mutex lock in invalidate_table_internal.
|
||||
--echo ** This will allow new result sets to be written into the QC.
|
||||
--echo **
|
||||
SET SESSION debug='+d,wait_in_query_cache_invalidate1';
|
||||
SET SESSION debug='+d,wait_in_query_cache_invalidate2';
|
||||
SET DEBUG_SYNC="wait_in_query_cache_invalidate1 SIGNAL parked1_1 WAIT_FOR go1_1";
|
||||
SET DEBUG_SYNC="wait_in_query_cache_invalidate2 SIGNAL parked1_2 WAIT_FOR go1_2";
|
||||
--send DELETE FROM t1 WHERE a like '%a%';
|
||||
|
||||
connection default;
|
||||
--echo =================================== Connection default
|
||||
--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';
|
||||
--source include/wait_condition.inc
|
||||
SET DEBUG_SYNC="now WAIT_FOR parked1_1";
|
||||
-- echo **
|
||||
|
||||
connection thd2;
|
||||
|
@ -173,32 +170,36 @@ connection thd2;
|
|||
--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 ** 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
|
||||
|
||||
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;
|
||||
--echo =================================== Connection thd3
|
||||
--echo ** On THD3: Insert another result into the cache and block on the same
|
||||
--echo ** debug hook.
|
||||
SET SESSION debug='+d,wait_in_query_cache_insert';
|
||||
--send SELECT SQL_CACHE * FROM t4 UNION SELECT * FROM t5;
|
||||
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
|
||||
|
||||
connection default;
|
||||
--echo =================================== Connection default
|
||||
--echo ** Assert that the two SELECT-stmt threads to reach the hook.
|
||||
LET $wait_condition= SELECT SQL_NO_CACHE COUNT(*)= 2 FROM information_schema.processlist WHERE state='wait_in_query_cache_insert';
|
||||
--source include/wait_condition.inc
|
||||
--echo ** Assert that the SELECT-stmt thread reaches the sync point.
|
||||
SET DEBUG_SYNC="now WAIT_FOR parked3";
|
||||
--echo **
|
||||
--echo **
|
||||
|
||||
--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 ** 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;
|
||||
KILL QUERY @flush_thread_id;
|
||||
SET DEBUG_SYNC="now SIGNAL go1_1";
|
||||
--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';
|
||||
--source include/wait_condition.inc
|
||||
SET DEBUG_SYNC="now WAIT_FOR parked1_2";
|
||||
|
||||
--echo **
|
||||
--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 ** until a broadcast signal reaches them causing both threads to
|
||||
--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;
|
||||
KILL QUERY @thread_id;
|
||||
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;
|
||||
SET DEBUG_SYNC="now SIGNAL go2";
|
||||
SET DEBUG_SYNC="now SIGNAL go3";
|
||||
|
||||
--echo **
|
||||
--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 ** invalidations and a broadcast signal will be sent to the thread
|
||||
--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;
|
||||
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
|
||||
SET DEBUG_SYNC="now SIGNAL go1_2";
|
||||
|
||||
--echo **
|
||||
--echo *************************************************************************
|
||||
|
@ -250,6 +245,7 @@ connection default;
|
|||
disconnect thd1;
|
||||
disconnect thd2;
|
||||
disconnect thd3;
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
SET GLOBAL query_cache_size= 0;
|
||||
|
||||
connection default;
|
||||
|
@ -259,4 +255,66 @@ FLUSH STATUS;
|
|||
DROP TABLE t1,t2,t3,t4,t5;
|
||||
SET GLOBAL query_cache_size= 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 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
|
||||
|
|
|
@ -148,10 +148,15 @@ CREATE TRIGGER t1_ad AFTER DELETE ON t1 FOR EACH ROW SET @b = 1;
|
|||
SET @a = 0;
|
||||
SET @b = 0;
|
||||
|
||||
--error ER_TRUNCATE_ILLEGAL_FK
|
||||
TRUNCATE t1;
|
||||
|
||||
SELECT @a, @b;
|
||||
|
||||
DELETE FROM t1;
|
||||
|
||||
SELECT @a, @b;
|
||||
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
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;
|
||||
|
||||
--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 # End of 5.5 tests
|
||||
--echo #
|
||||
|
|
|
@ -97,7 +97,7 @@ HANDLE my_get_osfhandle(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_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)
|
||||
DBUG_RETURN(0); /*return 0 at EOF*/
|
||||
my_osmaperr(lastError);
|
||||
DBUG_RETURN(-1);
|
||||
DBUG_RETURN((size_t)-1);
|
||||
}
|
||||
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)
|
||||
DBUG_RETURN(0); /*return 0 at EOF*/
|
||||
my_osmaperr(lastError);
|
||||
DBUG_RETURN(-1);
|
||||
DBUG_RETURN((size_t)-1);
|
||||
}
|
||||
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))
|
||||
{
|
||||
my_osmaperr(GetLastError());
|
||||
DBUG_RETURN(-1);
|
||||
DBUG_RETURN((size_t)-1);
|
||||
}
|
||||
else
|
||||
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_PRINT("my",("Filedes: %d, Buffer: %p, Count %llu", fd, Buffer,
|
||||
(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)
|
||||
{
|
||||
/*
|
||||
|
@ -442,10 +451,10 @@ size_t my_win_write(File fd, const uchar *Buffer, size_t Count)
|
|||
hFile= my_get_osfhandle(fd);
|
||||
if(!WriteFile(hFile, Buffer, (DWORD)Count, &nWritten, pov))
|
||||
{
|
||||
nWritten= (size_t)-1;
|
||||
my_osmaperr(GetLastError());
|
||||
DBUG_RETURN((size_t)-1);
|
||||
}
|
||||
DBUG_RETURN((size_t)nWritten);
|
||||
DBUG_RETURN(nWritten);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
/* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
@ -181,7 +181,7 @@ mysql_declare_plugin_end;
|
|||
To support all this variety, the dialog plugin has a callback function
|
||||
"authentication_dialog_ask". If the client has a function of this name
|
||||
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)),
|
||||
int type __attribute__((unused)),
|
||||
const char *prompt,
|
||||
char *buf, int buf_len __attribute__((unused)))
|
||||
char *buf, int buf_len)
|
||||
{
|
||||
char *ptr;
|
||||
fputs(prompt, stdout);
|
||||
fputc(' ', stdout);
|
||||
if (gets(buf) == 0)
|
||||
return 0;
|
||||
if (fgets(buf, buf_len, stdin) == NULL)
|
||||
return NULL;
|
||||
if ((ptr= strchr(buf, '\n')))
|
||||
*ptr= 0;
|
||||
|
||||
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)
|
||||
{
|
||||
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 *scramble_data;
|
||||
const char *scramble_plugin;
|
||||
|
|
|
@ -3337,113 +3337,123 @@ int ha_partition::delete_row(const uchar *buf)
|
|||
Called from sql_delete.cc by mysql_delete().
|
||||
Called from sql_select.cc by JOIN::reinit().
|
||||
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 error;
|
||||
bool truncate= FALSE;
|
||||
handler **file;
|
||||
THD *thd= ha_thd();
|
||||
DBUG_ENTER("ha_partition::delete_all_rows");
|
||||
|
||||
if (thd->lex->sql_command == SQLCOM_TRUNCATE)
|
||||
{
|
||||
Alter_info *alter_info= &thd->lex->alter_info;
|
||||
/* TRUNCATE also means resetting auto_increment */
|
||||
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 (alter_info->flags & ALTER_ADMIN_PARTITION)
|
||||
{
|
||||
/* ALTER TABLE t TRUNCATE PARTITION ... */
|
||||
List_iterator<partition_element> part_it(m_part_info->partitions);
|
||||
int saved_error= 0;
|
||||
uint num_parts= m_part_info->num_parts;
|
||||
uint num_subparts= m_part_info->num_subparts;
|
||||
uint i= 0;
|
||||
uint num_parts_set= alter_info->partition_names.elements;
|
||||
uint num_parts_found= set_part_state(alter_info, m_part_info,
|
||||
PART_ADMIN);
|
||||
if (num_parts_set != num_parts_found &&
|
||||
(!(alter_info->flags & ALTER_ALL_PARTITION)))
|
||||
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
|
||||
{
|
||||
partition_element *part_elem= part_it++;
|
||||
if (part_elem->part_state == PART_ADMIN)
|
||||
{
|
||||
if (m_is_sub_partitioned)
|
||||
{
|
||||
List_iterator<partition_element>
|
||||
subpart_it(part_elem->subpartitions);
|
||||
partition_element *sub_elem;
|
||||
uint j= 0, part;
|
||||
do
|
||||
{
|
||||
sub_elem= subpart_it++;
|
||||
part= i * num_subparts + j;
|
||||
bitmap_set_bit(&m_part_info->used_partitions, part);
|
||||
if (!saved_error)
|
||||
{
|
||||
DBUG_PRINT("info", ("truncate subpartition %u (%s)",
|
||||
part, sub_elem->partition_name));
|
||||
if ((error= m_file[part]->ha_delete_all_rows()))
|
||||
saved_error= error;
|
||||
/* 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);
|
||||
}
|
||||
else
|
||||
{
|
||||
DBUG_PRINT("info", ("truncate partition %u (%s)", i,
|
||||
part_elem->partition_name));
|
||||
bitmap_set_bit(&m_part_info->used_partitions, i);
|
||||
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;
|
||||
}
|
||||
} while (++i < num_parts);
|
||||
DBUG_RETURN(saved_error);
|
||||
}
|
||||
truncate= TRUE;
|
||||
}
|
||||
file= m_file;
|
||||
do
|
||||
{
|
||||
if ((error= (*file)->ha_delete_all_rows()))
|
||||
DBUG_RETURN(error);
|
||||
/* Ignore the error */
|
||||
if (truncate)
|
||||
(void) (*file)->ha_reset_auto_increment(0);
|
||||
} 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();
|
||||
table_share->ha_part_data->next_auto_inc_val= 0;
|
||||
table_share->ha_part_data->auto_inc_initialized= FALSE;
|
||||
unlock_auto_increment();
|
||||
|
||||
file= m_file;
|
||||
do
|
||||
{
|
||||
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);
|
||||
uint num_parts= m_part_info->num_parts;
|
||||
uint num_subparts= m_part_info->num_subparts;
|
||||
uint i= 0;
|
||||
uint num_parts_set= alter_info->partition_names.elements;
|
||||
uint num_parts_found= set_part_state(alter_info, m_part_info,
|
||||
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 &&
|
||||
(!(alter_info->flags & ALTER_ALL_PARTITION)))
|
||||
DBUG_RETURN(HA_ERR_NO_PARTITION_FOUND);
|
||||
|
||||
do
|
||||
{
|
||||
partition_element *part_elem= part_it++;
|
||||
if (part_elem->part_state == PART_ADMIN)
|
||||
{
|
||||
if (m_is_sub_partitioned)
|
||||
{
|
||||
List_iterator<partition_element>
|
||||
subpart_it(part_elem->subpartitions);
|
||||
partition_element *sub_elem;
|
||||
uint j= 0, part;
|
||||
do
|
||||
{
|
||||
sub_elem= subpart_it++;
|
||||
part= i * num_subparts + j;
|
||||
DBUG_PRINT("info", ("truncate subpartition %u (%s)",
|
||||
part, sub_elem->partition_name));
|
||||
if ((error= m_file[part]->ha_truncate()))
|
||||
break;
|
||||
} while (++j < num_subparts);
|
||||
}
|
||||
else
|
||||
{
|
||||
DBUG_PRINT("info", ("truncate partition %u (%s)", i,
|
||||
part_elem->partition_name));
|
||||
error= m_file[i]->ha_truncate();
|
||||
}
|
||||
part_elem->part_state= PART_NORMAL;
|
||||
}
|
||||
} while (!error && (++i < num_parts));
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Start a large batch of insert rows
|
||||
|
||||
|
@ -6327,8 +6337,8 @@ void ha_partition::print_error(int error, myf errflag)
|
|||
/* Should probably look for my own errors first */
|
||||
DBUG_PRINT("enter", ("error: %d", error));
|
||||
|
||||
if (error == HA_ERR_NO_PARTITION_FOUND &&
|
||||
thd->lex->sql_command != SQLCOM_TRUNCATE)
|
||||
if ((error == HA_ERR_NO_PARTITION_FOUND) &&
|
||||
! (thd->lex->alter_info.flags & ALTER_TRUNCATE_PARTITION))
|
||||
m_part_info->print_no_partition_found(table);
|
||||
else
|
||||
{
|
||||
|
|
|
@ -346,6 +346,7 @@ public:
|
|||
virtual int update_row(const uchar * old_data, uchar * new_data);
|
||||
virtual int delete_row(const uchar * buf);
|
||||
virtual int delete_all_rows(void);
|
||||
virtual int truncate();
|
||||
virtual void start_bulk_insert(ha_rows rows);
|
||||
virtual int end_bulk_insert();
|
||||
private:
|
||||
|
@ -354,6 +355,15 @@ private:
|
|||
long estimate_read_buffer_size(long original_size);
|
||||
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)
|
||||
{
|
||||
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.
|
||||
|
||||
|
|
|
@ -1331,6 +1331,7 @@ public:
|
|||
int ha_bulk_update_row(const uchar *old_data, uchar *new_data,
|
||||
uint *dup_key_found);
|
||||
int ha_delete_all_rows();
|
||||
int ha_truncate();
|
||||
int ha_reset_auto_increment(ulonglong value);
|
||||
int ha_optimize(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 */
|
||||
/** used in ALTER TABLE; 1 if changing storage engine is allowed */
|
||||
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; }
|
||||
virtual uint referenced_by_foreign_key() { return 0;}
|
||||
virtual void init_table_handle_for_HANDLER()
|
||||
|
@ -2010,16 +2036,34 @@ private:
|
|||
This is called to delete all rows in a table
|
||||
If the handler don't support this, then this function will
|
||||
return HA_ERR_WRONG_COMMAND and MySQL will delete the rows one
|
||||
by one. It should reset auto_increment if
|
||||
thd->lex->sql_command == SQLCOM_TRUNCATE.
|
||||
by one.
|
||||
*/
|
||||
virtual int delete_all_rows()
|
||||
{ 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
|
||||
inserted will get the given value. This is called e.g. after TRUNCATE
|
||||
is emulated by doing a 'DELETE FROM t'. HA_ERR_WRONG_COMMAND is
|
||||
returned by storage engines that don't support this operation.
|
||||
inserted will get the given value. HA_ERR_WRONG_COMMAND is returned by
|
||||
storage engines that don't support this operation.
|
||||
*/
|
||||
virtual int reset_auto_increment(ulonglong value)
|
||||
{ return HA_ERR_WRONG_COMMAND; }
|
||||
|
|
11
sql/item.cc
11
sql/item.cc
|
@ -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 its memory: it will be reused on each execute.
|
||||
*/
|
||||
arena= thd->is_stmt_prepare() ? thd->activate_stmt_arena_if_needed(&backup)
|
||||
: NULL;
|
||||
arena= thd->activate_stmt_arena_if_needed(&backup);
|
||||
|
||||
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:
|
||||
return new Item_cache_decimal();
|
||||
case STRING_RESULT:
|
||||
if (item->field_type() == MYSQL_TYPE_DATE ||
|
||||
item->field_type() == MYSQL_TYPE_DATETIME ||
|
||||
item->field_type() == MYSQL_TYPE_TIME)
|
||||
/* 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_TIME) &&
|
||||
(const_cast<Item*>(item))->result_as_longlong())
|
||||
return new Item_cache_datetime(item->field_type());
|
||||
return new Item_cache_str(item);
|
||||
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))
|
||||
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
|
||||
collation.set_numeric();
|
||||
|
|
|
@ -2299,7 +2299,8 @@ String *Item_func_format::val_str_ascii(String *str)
|
|||
if (lc->grouping[0] > 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;
|
||||
const char *grouping= lc->grouping;
|
||||
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
|
||||
we'll never get into this "if" anymore.
|
||||
*/
|
||||
if (!count)
|
||||
if (count == 0)
|
||||
{
|
||||
*--dst= lc->thousand_sep;
|
||||
if (grouping[1])
|
||||
|
|
|
@ -2857,10 +2857,11 @@ void Item_func_add_time::fix_length_and_dec()
|
|||
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);
|
||||
MYSQL_TIME l_time1, l_time2, l_time3;
|
||||
MYSQL_TIME l_time1, l_time2;
|
||||
bool is_time= 0;
|
||||
long days, microseconds;
|
||||
longlong seconds;
|
||||
|
@ -2886,41 +2887,38 @@ String *Item_func_add_time::val_str(String *str)
|
|||
if (l_time1.neg != l_time2.neg)
|
||||
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,
|
||||
&seconds, µseconds);
|
||||
time->neg= calc_time_diff(&l_time1, &l_time2, -l_sign,
|
||||
&seconds, µseconds);
|
||||
|
||||
/*
|
||||
If first argument was negative and diff between arguments
|
||||
is non-zero we need to swap sign to get proper result.
|
||||
*/
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
get_date_from_daynr(days,&l_time3.year,&l_time3.month,&l_time3.day);
|
||||
if (l_time3.day &&
|
||||
!make_datetime(l_time1.second_part || l_time2.second_part ?
|
||||
DATE_TIME_MICROSECOND : DATE_TIME,
|
||||
&l_time3, str))
|
||||
return str;
|
||||
get_date_from_daynr(days, &time->year, &time->month, &time->day);
|
||||
*format= l_time1.second_part || l_time2.second_part ?
|
||||
DATE_TIME_MICROSECOND : DATE_TIME;
|
||||
if (time->day)
|
||||
return time;
|
||||
goto null_date;
|
||||
}
|
||||
|
||||
l_time3.hour+= days*24;
|
||||
if (!make_datetime_with_warn(l_time1.second_part || l_time2.second_part ?
|
||||
TIME_MICROSECOND : TIME_ONLY,
|
||||
&l_time3, str))
|
||||
return str;
|
||||
*format= l_time1.second_part || l_time2.second_part ?
|
||||
TIME_MICROSECOND : TIME_ONLY;
|
||||
time->hour+= days*24;
|
||||
return time;
|
||||
|
||||
null_date:
|
||||
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)
|
||||
{
|
||||
if (is_date)
|
||||
|
|
|
@ -948,6 +948,8 @@ public:
|
|||
return save_date_in_field(field);
|
||||
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
|
||||
|
|
|
@ -158,16 +158,21 @@ static void inline slave_rows_error_report(enum loglevel level, int ha_error,
|
|||
" %s, Error_code: %d;", err->get_message_text(),
|
||||
err->get_sql_errno());
|
||||
}
|
||||
|
||||
rli->report(level, thd->is_error()? thd->stmt_da->sql_errno() : 0,
|
||||
"Could not execute %s event on table %s.%s;"
|
||||
"%s handler error %s; "
|
||||
"the event's master log %s, end_log_pos %lu",
|
||||
type, table->s->db.str,
|
||||
table->s->table_name.str,
|
||||
buff,
|
||||
handler_error == NULL? "<unknown>" : handler_error,
|
||||
log_name, pos);
|
||||
|
||||
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;"
|
||||
"%s handler error %s; "
|
||||
"the event's master log %s, end_log_pos %lu",
|
||||
type, table->s->db.str, table->s->table_name.str,
|
||||
buff, handler_error == NULL ? "<unknown>" : handler_error,
|
||||
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
|
||||
|
||||
|
@ -7811,19 +7816,16 @@ int Rows_log_event::do_apply_event(Relay_log_info const *rli)
|
|||
/Sven
|
||||
*/
|
||||
thd->reset_current_stmt_binlog_format_row();
|
||||
const_cast<Relay_log_info*>(rli)->cleanup_context(thd, error);
|
||||
thd->is_slave_error= 1;
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
if (get_flags(STMT_END_F))
|
||||
if ((error= rows_event_stmt_cleanup(rli, thd)))
|
||||
rli->report(ERROR_LEVEL, error,
|
||||
"Error in %s event: commit of row events failed, "
|
||||
"table `%s`.`%s`",
|
||||
get_type_str(), m_table->s->db.str,
|
||||
m_table->s->table_name.str);
|
||||
|
||||
if (get_flags(STMT_END_F) && (error= rows_event_stmt_cleanup(rli, thd)))
|
||||
slave_rows_error_report(ERROR_LEVEL,
|
||||
thd->is_error() ? 0 : error,
|
||||
rli, thd, table,
|
||||
get_type_str(),
|
||||
RPL_LOG_NAME, (ulong) log_pos);
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
|
|
@ -265,6 +265,8 @@ extern "C" sig_handler handle_segfault(int sig);
|
|||
|
||||
/* Constants */
|
||||
|
||||
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||
|
||||
const char *show_comp_option_name[]= {"YES", "NO", "DISABLED"};
|
||||
|
||||
static const char *tc_heuristic_recover_names[]=
|
||||
|
@ -3200,6 +3202,11 @@ static int init_common_variables()
|
|||
return 1;
|
||||
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,
|
||||
server_version, SYSTEM_TYPE,MACHINE_TYPE));
|
||||
|
||||
|
@ -3237,12 +3244,11 @@ static int init_common_variables()
|
|||
desired page sizes.
|
||||
*/
|
||||
int nelem;
|
||||
int max_desired_page_size;
|
||||
int max_page_size;
|
||||
size_t max_desired_page_size;
|
||||
if (opt_super_large_pages)
|
||||
max_page_size= SUPER_LARGE_PAGESIZE;
|
||||
max_desired_page_size= SUPER_LARGE_PAGESIZE;
|
||||
else
|
||||
max_page_size= LARGE_PAGESIZE;
|
||||
max_desired_page_size= LARGE_PAGESIZE;
|
||||
nelem = getpagesizes(NULL, 0);
|
||||
if (nelem > 0)
|
||||
{
|
||||
|
@ -6593,13 +6599,8 @@ static void usage(void)
|
|||
if (!default_collation_name)
|
||||
default_collation_name= (char*) default_charset_info->name;
|
||||
print_version();
|
||||
puts("\
|
||||
Copyright (C) 2000-2008 MySQL AB, by Monty and others.\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");
|
||||
|
||||
puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
|
||||
puts("Starts the MySQL database server.\n");
|
||||
printf("Usage: %s [OPTIONS]\n", my_progname);
|
||||
if (!opt_verbose)
|
||||
puts("\nFor more help options (several pages), use mysqld --verbose --help.");
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#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_cond_t COND_rpl_status;
|
||||
HASH slave_list;
|
||||
|
@ -68,7 +68,7 @@ static Slave_log_event* find_slave_event(IO_CACHE* log,
|
|||
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);
|
||||
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_RECOVERY_CAPTAIN,RPL_NULL /* inactive */,
|
||||
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_cond_t COND_rpl_status;
|
||||
|
@ -34,7 +34,7 @@ extern TYPELIB rpl_role_typelib;
|
|||
extern const char* rpl_role_type[], *rpl_status_type[];
|
||||
|
||||
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 update_slave_list(MYSQL* mysql, Master_info* mi);
|
||||
|
||||
|
|
|
@ -57,6 +57,13 @@ struct scheduler_functions
|
|||
*/
|
||||
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_NO_THREADS,
|
||||
SCHEDULER_TYPES_COUNT
|
||||
|
|
|
@ -6152,7 +6152,7 @@ ER_WARN_ENGINE_TRANSACTION_ROLLBACK
|
|||
ER_SLAVE_HEARTBEAT_FAILURE
|
||||
eng "Unexpected master's heartbeat data: %s"
|
||||
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
|
||||
eng "Bad schema for mysql.ndb_replication table. Message: %-.64s"
|
||||
|
@ -6379,3 +6379,16 @@ ER_SET_PASSWORD_AUTH_PLUGIN
|
|||
|
||||
ER_GRANT_PLUGIN_USER_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
|
||||
{
|
||||
exec_res= 0;
|
||||
trans_rollback(thd);
|
||||
close_thread_tables(thd);
|
||||
thd->mdl_context.release_transactional_locks();
|
||||
rli->cleanup_context(thd, 1);
|
||||
/* chance for concurrent connection to get more locks */
|
||||
safe_sleep(thd, min(rli->trans_retries, MAX_SLAVE_RETRY_PAUSE),
|
||||
(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
|
||||
must "proactively" clear playgrounds:
|
||||
*/
|
||||
thd->clear_error();
|
||||
rli->cleanup_context(thd, 1);
|
||||
/*
|
||||
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;
|
||||
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);
|
||||
|
||||
/* 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)
|
||||
{
|
||||
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];
|
||||
bool create_new_users=0;
|
||||
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 "sql_acl.h" // SELECT_ACL
|
||||
#include "sql_base.h" // TMP_TABLE_KEY_EXTRA
|
||||
#include "debug_sync.h" // DEBUG_SYNC
|
||||
#ifdef HAVE_QUERY_CACHE
|
||||
#include <m_ctype.h>
|
||||
#include <my_dir.h>
|
||||
|
@ -341,6 +342,7 @@ TODO list:
|
|||
#include "../storage/myisammrg/ha_myisammrg.h"
|
||||
#include "../storage/myisammrg/myrg_def.h"
|
||||
#include "probes_mysql.h"
|
||||
#include "transaction.h"
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
#include "emb_qcache.h"
|
||||
|
@ -370,32 +372,6 @@ TODO list:
|
|||
__LINE__,(ulong)(B)));B->query()->unlock_reading();}
|
||||
#define DUMP(C) DBUG_EXECUTE("qcache", {\
|
||||
(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
|
||||
#define RW_WLOCK(M) mysql_rwlock_wrlock(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)
|
||||
#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.
|
||||
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 interrupt= FALSE;
|
||||
THD *thd= current_thd;
|
||||
Query_cache_wait_state wait_state(thd, __func__, __FILE__, __LINE__);
|
||||
DBUG_ENTER("Query_cache::try_lock");
|
||||
|
||||
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;
|
||||
#ifndef DBUG_OFF
|
||||
THD *thd= current_thd;
|
||||
if (thd)
|
||||
m_cache_lock_thread_id= thd->thread_id;
|
||||
#endif
|
||||
|
@ -496,6 +519,8 @@ bool Query_cache::try_lock(bool use_timeout)
|
|||
|
||||
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");
|
||||
|
||||
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);
|
||||
m_cache_lock_status= Query_cache::LOCKED_NO_WAIT;
|
||||
#ifndef DBUG_OFF
|
||||
THD *thd= current_thd;
|
||||
if (thd)
|
||||
m_cache_lock_thread_id= thd->thread_id;
|
||||
#endif
|
||||
|
@ -524,6 +548,8 @@ void Query_cache::lock_and_suspend(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");
|
||||
|
||||
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);
|
||||
m_cache_lock_status= Query_cache::LOCKED;
|
||||
#ifndef DBUG_OFF
|
||||
THD *thd= current_thd;
|
||||
if (thd)
|
||||
m_cache_lock_thread_id= thd->thread_id;
|
||||
#endif
|
||||
|
@ -871,9 +896,7 @@ Query_cache::insert(Query_cache_tls *query_cache_tls,
|
|||
if (is_disabled() || query_cache_tls->first_query_block == NULL)
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
DBUG_EXECUTE_IF("wait_in_query_cache_insert",
|
||||
debug_wait_for_kill("wait_in_query_cache_insert"); );
|
||||
|
||||
QC_DEBUG_SYNC("wait_in_query_cache_insert");
|
||||
|
||||
if (try_lock())
|
||||
DBUG_VOID_RETURN;
|
||||
|
@ -1683,6 +1706,8 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
|||
}
|
||||
else
|
||||
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
|
||||
}
|
||||
else
|
||||
|
@ -1724,6 +1749,13 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
|||
|
||||
thd->limit_found_rows = query->found_rows();
|
||||
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())
|
||||
thd->stmt_da->disable_status();
|
||||
|
||||
|
@ -1769,8 +1801,7 @@ void Query_cache::invalidate(THD *thd, TABLE_LIST *tables_used,
|
|||
invalidate_table(thd, tables_used);
|
||||
}
|
||||
|
||||
DBUG_EXECUTE_IF("wait_after_query_cache_invalidate",
|
||||
debug_wait_for_kill("wait_after_query_cache_invalidate"););
|
||||
DEBUG_SYNC(thd, "wait_after_query_cache_invalidate");
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
@ -1961,8 +1992,7 @@ void Query_cache::flush()
|
|||
if (is_disabled())
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
DBUG_EXECUTE_IF("wait_in_query_cache_flush1",
|
||||
debug_wait_for_kill("wait_in_query_cache_flush1"););
|
||||
QC_DEBUG_SYNC("wait_in_query_cache_flush1");
|
||||
|
||||
lock_and_suspend();
|
||||
if (query_cache_size > 0)
|
||||
|
@ -2302,9 +2332,7 @@ void Query_cache::free_cache()
|
|||
|
||||
void Query_cache::flush_cache()
|
||||
{
|
||||
|
||||
DBUG_EXECUTE_IF("wait_in_query_cache_flush2",
|
||||
debug_wait_for_kill("wait_in_query_cache_flush2"););
|
||||
QC_DEBUG_SYNC("wait_in_query_cache_flush2");
|
||||
|
||||
my_hash_reset(&queries);
|
||||
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)
|
||||
{
|
||||
DBUG_EXECUTE_IF("wait_in_query_cache_invalidate1",
|
||||
debug_wait_for_kill("wait_in_query_cache_invalidate1"); );
|
||||
DEBUG_SYNC(thd, "wait_in_query_cache_invalidate1");
|
||||
|
||||
/*
|
||||
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();
|
||||
|
||||
DBUG_EXECUTE_IF("wait_in_query_cache_invalidate2",
|
||||
debug_wait_for_kill("wait_in_query_cache_invalidate2"); );
|
||||
|
||||
DEBUG_SYNC(thd, "wait_in_query_cache_invalidate2");
|
||||
|
||||
if (query_cache_size > 0)
|
||||
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();
|
||||
BLOCK_LOCK_WR(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))
|
||||
{
|
||||
DBUG_ASSERT(target_tbl->correspondent_table->view &&
|
||||
target_tbl->correspondent_table->merge_underlying_list &&
|
||||
target_tbl->correspondent_table->merge_underlying_list->
|
||||
next_local);
|
||||
target_tbl->correspondent_table->multitable_view);
|
||||
my_error(ER_VIEW_DELETE_MERGE_VIEW, MYF(0),
|
||||
target_tbl->correspondent_table->view_db.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->next_number_field->val_int());
|
||||
info->touched++;
|
||||
if ((table->file->ha_table_flags() & HA_PARTIAL_COLUMN_READ &&
|
||||
!bitmap_is_subset(table->write_set, table->read_set)) ||
|
||||
compare_record(table))
|
||||
if (!records_are_comparable(table) || compare_records(table))
|
||||
{
|
||||
if ((error=table->file->ha_update_row(table->record[1],
|
||||
table->record[0])) &&
|
||||
|
|
|
@ -958,6 +958,7 @@ inline bool st_select_lex_unit::is_union ()
|
|||
#define ALTER_ALL_PARTITION (1L << 21)
|
||||
#define ALTER_REMOVE_PARTITIONING (1L << 22)
|
||||
#define ALTER_FOREIGN_KEY (1L << 23)
|
||||
#define ALTER_TRUNCATE_PARTITION (1L << 24)
|
||||
|
||||
enum enum_alter_table_change_level
|
||||
{
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "sql_locale.h" // my_locale_en_US
|
||||
#include "log.h" // flush_error_log
|
||||
#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_update.h" // mysql_update, mysql_multi_update
|
||||
#include "sql_partition.h" // struct partition_info
|
||||
|
@ -49,7 +49,6 @@
|
|||
// mysql_recreate_table,
|
||||
// mysql_backup_table,
|
||||
// mysql_restore_table
|
||||
#include "sql_truncate.h" // mysql_truncate_table
|
||||
#include "sql_reload.h" // reload_acl_and_cache
|
||||
#include "sql_admin.h" // mysql_assign_to_keycache
|
||||
#include "sql_connect.h" // check_user,
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
#include "sql_parse.h" // check_one_table_access
|
||||
#include "sql_table.h" // mysql_alter_table, etc.
|
||||
#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_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
|
||||
|
||||
|
@ -46,7 +46,7 @@ bool Alter_table_analyze_partition_statement::execute(THD *thd)
|
|||
m_lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
|
||||
|
||||
res= Analyze_table_statement::execute(thd);
|
||||
|
||||
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
|
||||
|
@ -104,36 +104,85 @@ bool Alter_table_repair_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;
|
||||
bool res;
|
||||
enum_sql_command original_sql_command;
|
||||
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
|
||||
by ha_partition.
|
||||
*/
|
||||
m_lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
|
||||
|
||||
/*
|
||||
Fix the lock types (not the same as ordinary ALTER TABLE).
|
||||
*/
|
||||
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_SHARED_NO_READ_WRITE);
|
||||
first_table->mdl_request.set_type(MDL_EXCLUSIVE);
|
||||
|
||||
/* execute as a TRUNCATE TABLE */
|
||||
res= Truncate_statement::execute(thd);
|
||||
/*
|
||||
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.
|
||||
*/
|
||||
|
||||
m_lex->sql_command= original_sql_command;
|
||||
DBUG_RETURN(res);
|
||||
if (check_one_table_access(thd, DROP_ACL, first_table))
|
||||
DBUG_RETURN(TRUE);
|
||||
|
||||
if (open_and_lock_tables(thd, first_table, FALSE, 0))
|
||||
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 */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue